Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 4
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3289 times and has 3 replies Next Thread
dimm
Newbie




Joined: Apr 4, 2012
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
How to free resources?

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.
[May 23, 2012, 10:52:06 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dimm
Newbie




Joined: Apr 4, 2012
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
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.
[May 24, 2012, 1:15:01 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dimm
Newbie




Joined: Apr 4, 2012
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
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);
[May 29, 2012, 3:54:09 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
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 developer
[May 29, 2012, 7:24:52 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved