Simple question that I can't find an answer to, On openGL there is a glDeleteTextures(1, &t) Obviously the model is quite drastically different but i'm wondering if Metal has the same need or requirement.
Are MTLTexture's just released via reference counting or is there another way to release the texture and let the GPU clear it out of its caches as well?
MTLTexture lifetimes are managed exactly like other objects: they are dealloc'ed when their refcount reaches 0 (whether that happens automatically with ARC/Swift or MRR under Obj-C). Objects that use textures, like command buffers, may retain textures while they are in use, affecting their lifetime, but most applications can happily ignore this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With