This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 170545 - Search results held in memory
Summary: Search results held in memory
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Victor Vasilyev
URL: http://profiler.netbeans.org/files/do...
Keywords: PERFORMANCE
: 175620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-18 13:25 UTC by Tomas Hurka
Modified: 2010-03-31 12:25 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Memory before call of Find action (27.19 KB, image/png)
2010-03-31 12:22 UTC, Victor Vasilyev
Details
Memory after completion of Find action (119.04 KB, image/png)
2010-03-31 12:23 UTC, Victor Vasilyev
Details
Memory after closing of Search Results window (116.29 KB, image/png)
2010-03-31 12:25 UTC, Victor Vasilyev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2009-08-18 13:25:19 UTC
Search results are held in memory even if search window is closed.

Steps to reproduce:
1) Invoke 'Find ..' in Favorites on netbeans source root.
2) Leave text empty and select "*.png" as selected files
3) Run search

After search finishes close search output window. If you take a look at heap dump (available in URL field above) you will see that there is still one instance 
of SpecialSearchGroup, which contains LinkedList searchItems, which has about 129000 FileObjects.
Comment 1 Victor Vasilyev 2009-10-29 11:45:31 UTC
*** Issue 175620 has been marked as a duplicate of this issue. ***
Comment 2 Victor Vasilyev 2010-03-31 11:57:41 UTC
I absolutely agree. Closing the top window "Search Results" must also close all inner tabs with the last search results and release all related objects.
Comment 3 Victor Vasilyev 2010-03-31 12:20:23 UTC
Fixed
http://hg.netbeans.org/main/rev/ceb0f88779f0

I've tested this via profiler. Results of the memory usage by org.netbeans.modules.search.* objects will be attached.
Comment 4 Victor Vasilyev 2010-03-31 12:22:21 UTC
Created attachment 96420 [details]
Memory before call of Find action
Comment 5 Victor Vasilyev 2010-03-31 12:23:47 UTC
Created attachment 96421 [details]
Memory after completion of Find action
Comment 6 Victor Vasilyev 2010-03-31 12:25:18 UTC
Created attachment 96422 [details]
Memory after closing of Search Results window