![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Feb 2009
Posts: 17
![]() |
Hello,
I'm using wwj to load dynamiclly WWicon from a databse every seconds , insert them in a renderbale layer and display them . It's working but if I let my application work for a long time (2 hours) I get an out of memory exception . I'm clearing the content of the layer with this piece of code but I thinks that it's not enough to free the memory : Code:
layerVol.removeAllIcons();
layerVol.resetListeVol();
layerVol.dispose();
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jul 2011
Posts: 5
![]() |
Sounds like a memory leak of some sort.
Not sure if you're just reusing layerVol as a container, or making a new layerVol every time you regenerate the layer, but check to see if layerVol.dispose() sets layerVol to null. If not you might want to try this before calling System.gc(). |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2008
Location: Melbourne, FL, USA
Posts: 678
![]() |
removeAllIcons(); // clears the collection
resetListeVol(); // doesn't exist as far as i can tell dispose(); // does nothing in an IconLayer your issue is probably with the renderables and tc's proably spot on with a garbage collection issue. make sure your not holding a reference to the images anywhere but in the renderable.
__________________ |