Graphics

 View Only
  • 1.  Scene Lifetime

    Posted 08-03-2015 04:52
    Hi there,

    I'm using the COM API and I'm wondering when a scene is deleted/removed from memory? As in when I call to get a scene its by default returns a copy, when does that copy get deleted? I cant see any explict call to delete, or is it just when my variable for the object goes out of scope?


  • 2.  RE: Scene Lifetime

    Posted 08-03-2015 14:07
    It gets deleted when the variable goes out of scope AND when the .NET garbage collector in your API application decides to clean up that variable from memory. You can also force the .NET garbage collector to run by calling GC.Collect(). If using a non .NET language with the COM API such as Delphi for example, there is no garbage collector, so it gets deleted as soon as the interfaced object has its ref count set back to zero.

    #XPression


  • 3.  RE: Scene Lifetime

    Posted 08-04-2015 03:30
    Thanks Brian, I was just wondering because I've seen other COM API libraries that want you call Dispose() on the objects once your done with them.

    #XPression