Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Director FAQ [14] Objects, Parent Scripts & Factories [14.10] Do I need to dispose of these objects when Im done?

0
Posted

Director FAQ [14] Objects, Parent Scripts & Factories [14.10] Do I need to dispose of these objects when Im done?

0

In general, child objects birthed from parent scripts dispose of themselves as soon as there aren’t any variables around the place referring to them: since you can’t use them if you don’t have a reference to them, Director takes the opportunity to trash them and reclaim the memory they used. However, there may be cases where references are kept not in variables, but in lists or the properties of other objects. As discussed in section 12.8, if a circular reference arises (if, for example, your object keeps a reference to itself — not as outlandish as it may seem, honest guv — or keeps a reference to another object which in turn keeps a reference to it, etc), the memory occupied by an object may be lost to your movie permanently. If your objects are simple, and don’t cross-reference one another, it should usually be sufficient to clear out any object variables that you’re no longer using. If they’re kept as globals, they’ll stay around until you set them to something else, or issue a c

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123