Closed
Bug 28559
Opened 26 years ago
Closed 26 years ago
[MLK] Leaking nsDeviceContextMac in nsImageMac::Draw()
Categories
(Core Graveyard :: GFX, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M15
People
(Reporter: beard, Assigned: dcone)
References
()
Details
(Keywords: memory-leak)
On line 323, a call to nsRenderingContextMac::GetDeviceContext() isn't being
balanced with an NS_RELEASE. This causes an nsDeviceContextMac leak.
| Reporter | ||
Updated•26 years ago
|
OS: Mac System 8.5 → All
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M15
Comment 1•26 years ago
|
||
dcone--can we get a fix for this bug soon? Thanks!
| Assignee | ||
Comment 2•26 years ago
|
||
As soon as the tree opens...
Keywords: mlk
| Reporter | ||
Comment 3•26 years ago
|
||
Here's a patch against latest source:
Index: mozilla/gfx/src/mac/nsImageMac.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/mac/nsImageMac.cpp,v
retrieving revision 1.24
diff -c -2 -r1.24 nsImageMac.cpp
*** nsImageMac.cpp 2000/03/11 03:07:26 1.24
--- nsImageMac.cpp 2000/03/12 16:41:11
***************
*** 291,296 ****
{
PixMapHandle imagePixMap;
! Rect srcRect, dstRect, maskRect;
! nsDeviceContextMac *theDevContext;
if (!mImageGWorld)
--- 291,295 ----
{
PixMapHandle imagePixMap;
! Rect srcRect, dstRect, maskRect;
if (!mImageGWorld)
***************
*** 336,342 ****
#if !TARGET_CARBON
// can only do this if we are NOT printing
! aContext.GetDeviceContext(theDevContext);
!
! if(!theDevContext->IsPrinter()){
#endif
::CopyDeepMask((BitMap*)*imagePixMap, (BitMap*)*maskPixMap,
(BitMap*)*destPixels, &srcRect, &maskRect, &dstRect, srcCopy, nsnull);
--- 335,343 ----
#if !TARGET_CARBON
// can only do this if we are NOT printing
! nsCOMPtr<nsIDeviceContext> deviceContext;
! aContext.GetDeviceContext(*getter_AddRefs(deviceContext));
! nsDeviceContextMac* macDeviceContext = dynamic_cast<nsDeviceContextMac*
>((nsIDeviceContext*) deviceContext);
!
! if(macDeviceContext && !macDeviceContext->IsPrinter()){
#endif
::CopyDeepMask((BitMap*)*imagePixMap, (BitMap*)*maskPixMap,
(BitMap*)*destPixels, &srcRect, &maskRect, &dstRect, srcCopy, nsnull);
| Assignee | ||
Comment 4•26 years ago
|
||
code changed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•