This is a migrated thread and some comments may be shown as answers.

Release ObjectContainer Memory/Resources

1 Answer 30 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thomas
Top achievements
Rank 1
Thomas asked on 03 Apr 2013, 01:52 PM
Hello,

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?

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 10 Apr 2013, 12:59 PM
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. 

Greetings,
Thomas
the Telerik team
Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
Tags
Development (API, general questions)
Asked by
Thomas
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or