Jump to content

Track object references in UnigineScript


photo

Recommended Posts

Is there a way to track where/when instances of extern classes are referenced and un-referenced in the UnigineScript environment? I have some classes that aren't being deleted when I expect, not sure what is holding references to them, and not sure of the best way to identify this. Please help.

Link to comment
  • 3 weeks later...

Hi,

 

Is there a way to track where/when instances of extern classes are referenced and un-referenced in the UnigineScript environment? I have some classes that aren't being deleted when I expect, not sure what is holding references to them, and not sure of the best way to identify this. Please help.

 

Only with a special debug build perhaps (and even that might be a hassle). Normally we don't keep the exact script locations that reference the objects, only the reference counter.

 

For the record, I was able to repeat your original issue by merely declaring a global-level MyUserClass testThat variable in the world script. So at the very least *that* kind of a reference would survive until a rather late shutdown() stage.

Link to comment
×
×
  • Create New...