cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Murphy (" <>
Subject Continual creation is a memory leak
Date Sun, 11 Dec 2011 06:51:03 GMT
I have a server application that continually reads data from sensors. At
set intervals the data is summarized. This summary data is used to create
Cayenne data objects of type Reading. A short transaction commits these
Reading objects to the database, after which it is not important that they
are held in memory - they were created only to be stored. After a long
period of time their continual collection results in an 'OutOfMemory' JVM

There are many objects of type Reading for another Cayenne data object
called SubstancePoint. And there's a whole object graph going back from
there. I basically want to keep the whole of the object graph in memory,
except for these Reading objects.

Is there a way to 'disappear' data objects from the DataContext? For that
is what I think would solve my problem. I have tried calling
DataContext.unregisterObjects() post-commit on the Reading data objects I
want evacuated from memory, but I can see that the leak is still going on.

Thank you ~ Chris Murphy

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message