Closed Bug 276361 Opened 20 years ago Closed 20 years ago

Major BView leak in nsDrawingSurfaceBeOS

Categories

(Core Graveyard :: GFX: BeOS, defect)

x86
BeOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: simontaylor2, Assigned: simontaylor2)

References

Details

(Keywords: crash, memory-leak)

Attachments

(1 file)

When an offscreen drawing surface is created, it uses a BBitmap with an attached
BView to enable the BBitmap to be drawn to.

However in the nsDrawingSurface destructor, the BView is removed from the bitmap
but not deleted. After a while (especially in firefox - the transparency in the
loading icon uses lots of drawing surfaces), BeOS hits a hard limit around 32000
BViews per application and crashes with the debugger message "The token space is
full. I will crash now."

According to the BeBook, the BBitmap destructor takes care of removing and
freeing and child views, so all that is required to fix the leak is to remove
the line that removes the view from the BBitmap before calling delete on the
BBitmap.

A simple patch is on the way.
Severity: major → critical
Keywords: crash, mlk
This simple patch fixes the leak.

BeOS-only code in a BeOS-only folder.

If someone could review and check in that would be great.
Comment on attachment 169836 [details] [diff] [review]
Simple fix (diff -up4)

Requesting review.
Attachment #169836 - Flags: review?(sergei_d)
Blocks: 266252
Comment on attachment 169836 [details] [diff] [review]
Simple fix (diff -up4)

r=sergei_d

no need for sr,
pure port-only patch
Attachment #169836 - Flags: review?(sergei_d) → review+
Can we get this checked in?

Then the next thing to do is to get an nsDrawingSurface::Lock() implementation
into the tree, but that's in another bug.
Checked in by timeless on the first of Januari (thanks!)
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: