Closed Bug 101814 Opened 23 years ago Closed 23 years ago

beos scrollbars leak

Categories

(Core :: XUL, defect, P2)

x86
BeOS
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.6

People

(Reporter: netscape, Assigned: netscape)

Details

(Keywords: memory-leak, Whiteboard: [tind-mlk])

Attachments

(1 file, 1 obsolete file)

nsScrollbar accounts for 24k of the 33k leaking on the tinderbox.  I spent some 
time this past weekend looking at the problem and I noticed that we never 
properly destroyed the underlying mScrollbar member (a BView) when we were 
shutting down.  I have a patch that deletes mScrollbar and causes the leak 
numbers to drop but it's not quite correct.  Even though the bloat test 
completes, a normal build shows that the app locks up whenever a page with 
widget that uses a scrollbar (text area, list box, etc) so I'm guessing that the 
BView is locking the looper during the destroy and winds up hanging the app when 
it goes away.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: mlk
Priority: -- → P2
Whiteboard: [tind-mlk]
Target Milestone: --- → mozilla0.9.6
Only thing I can suggest, since I haven't looked at the nsScrollBar code in a
while and haven't looked at your patch, yet, is to put a vote in on bug 18895,
which should get rid of our native scroll bars all together!  In the mean time,
when I'm done with the drag and drop code, I'll take a look at it. 
Attachment #50958 - Attachment is obsolete: true
Ok, it's basically the same patch but cleaned up & with the explicit  |delete
mScrollbar| removed.  It looks as though mScrollbar was deleted when
nsWindow::Destroy() was called (mScrollbar == mView) but for reasons unknown,
mScrollbar was not being set to 0.  So, I didn't have to explicitly delete
mScrollbar but I did have to explicitly Release the nsScrollbar instance so that
its destructor is called. 
Comment on attachment 52331 [details] [diff] [review]
Fix nsScrollbar leaks

r=pavlov
Attachment #52331 - Flags: review+
Patch checked in. 

----------------------------------------------leaks------leaks%------bloat------bloat%
TOTAL                                         22948     -56.41%   25161994     
 0.25%
--FIXED-LEAKS---------------------------------leaks------leaks%-----------------------
nsScrollbar                                       0    -100.00%


Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: