mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
use IntrusivePtr to share object (#11729)
This commit is contained in:
@@ -45,13 +45,11 @@ ccstd::unordered_map<Format, Feature, EnumHasher> featureCheckMap{};
|
||||
|
||||
TextureValidator::TextureValidator(Texture *actor)
|
||||
: Agent<Texture>(actor) {
|
||||
CC_SAFE_ADD_REF(actor);
|
||||
_typedID = actor->getTypedID();
|
||||
}
|
||||
|
||||
TextureValidator::~TextureValidator() {
|
||||
DeviceResourceTracker<Texture>::erase(this);
|
||||
if (_ownTheActor) CC_SAFE_RELEASE(_actor);
|
||||
}
|
||||
|
||||
void TextureValidator::doInit(const TextureInfo &info) {
|
||||
|
||||
Reference in New Issue
Block a user