When to implement destroy...

What’s the general rule for implementing our destroy pattern?

My guess is that its similar to IDisposable in .NET; that is an object should implement isDestroyed and destroy only if it contains external resources, such as WebGL resources, or if it manages the lifetime of an object that does the same (any object that implements destroy itself).

Is my assumption correct, or is the answer something else? As soon as we reach consensus, I’ll update the wiki with the answer.



You are spot on. There is a slightly outdated description in the coding standards on our internal wiki; I’m working on making these public as we re-evaluate them with all the experience we’ve gained. You’re welcome to also transfer the obvious ones to the public wiki.