Release ObjectContainer Memory/Resources

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    2 posts
    Member since:
    Sep 2008

    Posted 03 Apr 2013 Link to this post


    we are using the ObjectContainer to cache our Business Objects on the client.
    For historical reasons we implemeted a mass import/export on the client which uses in turn the ObjectContainer.
    Up to now the ObjectContainer is a singleton which just grows and leads to a OutOfMemory-Exception once the data volume to import or export is large enough.
    As a new approach I tried to use several instances of ObjectContainer to cope with the memory problem. Basically the approach works but memory consumption is still a problem. Now my question is if I need to release any resources from the ObjectContainer so that the container can be garbage-collected?

  2. Thomas
    Thomas avatar
    588 posts

    Posted 10 Apr 2013 Link to this post

    Hi Thomas,

    no, once the ObjectContainer becomes collectable, all data in it becomes collectable as well and will GC'd. Please make sure that you do not have references to the objects in the container (from outside the container); check  the static fields. 

    the Telerik team
    Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
  3. DevCraft banner
Back to Top