Commit 860ae452 authored by Jan Djärv's avatar Jan Djärv
Browse files

Fix memory leak

* nsimage.m (allocInitFromFile:): Initialize bmRep.
(dealloc): Release bmRep.
parent 65bb8d05
2014-11-02 Jan Djärv <jan.h.d@swipnet.se> 2014-11-02 Jan Djärv <jan.h.d@swipnet.se>
   
* nsimage.m (allocInitFromFile:): Initialize bmRep.
(dealloc): Release bmRep.
* nsterm.h (EmacsImage): Remove imageListNext, refCount, reference, * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
imageListSetNext, imageListNext. imageListSetNext, imageListNext.
   
......
...@@ -174,6 +174,7 @@ @implementation EmacsImage ...@@ -174,6 +174,7 @@ @implementation EmacsImage
image = [[EmacsImage alloc] initByReferencingFile: image = [[EmacsImage alloc] initByReferencingFile:
[NSString stringWithUTF8String: SSDATA (found)]]; [NSString stringWithUTF8String: SSDATA (found)]];
image->bmRep = nil;
#ifdef NS_IMPL_COCOA #ifdef NS_IMPL_COCOA
imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
#else #else
...@@ -199,6 +200,7 @@ @implementation EmacsImage ...@@ -199,6 +200,7 @@ @implementation EmacsImage
- (void)dealloc - (void)dealloc
{ {
[stippleMask release]; [stippleMask release];
[bmRep release];
[super dealloc]; [super dealloc];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment