I'm trying to figure out how to free resources. My plugin generates many furniture pieces. I delete everything before running another run, but it seems the memory is never reclaimed.
Memory: 49,892K Free: 6,861K (13%) ... completed.
Memory: 239,752K Free: 11,121K (4%) ... completed.
Memory: 676,348K Free: 284,126K (42%) ... completed.
Memory: 753,096K Free: 215,793K (28%) ... completed.
Memory: 979,672K Free: 423,821K (43%) ... completed.
What is the proper way to reset the Plugin Home instance?
Thanks for your help.
How to free resources?
This topic has been viewed 4275 times and has 3 replies
Re: How to free resources?
The issue seems to be in Top View. It consumes 10 times more memory than "Catalog Icons View" per run and never releases the resources. I have a hundred plain boxes which in "Catalog Icons" mode render real time on top, but take a minute or two to render in "Top View" mode. All are the same (cloned) and have the same color (no textures). The bottom (3D view) renders fine in both cases.
Re: How to free resources?
Deleting plan furniture does not delete the top view from the cache. To clear it toggle setFurnitureViewedFromTop.
Settings.plugin.getUserPreferences().setFurnitureViewedFromTop(false);
Settings.plugin.getUserPreferences().setFurnitureViewedFromTop(true);
Settings.plugin.getUserPreferences().setFurnitureViewedFromTop(false);
Settings.plugin.getUserPreferences().setFurnitureViewedFromTop(true);
Re: How to free resources?
The cache of icons seen from top is managed by furnitureTopViewIconsCache field in PlanComponent class. This cache is an instance of java.util.WeakHashMap and its entries will be released when furniture of the plan will be out of reach. Check your plug-in correctly frees the references to HomePieceOfFurniture instances otherwise this cache can't be emptied.
Emmanuel Puybaret, Sweet Home 3D creator
Who is online
Users browsing this forum: No registered users and 0 guests