Fix memory leak

* nsimage.m (allocInitFromFile:): Initialize bmRep.
(dealloc): Release bmRep.
This commit is contained in:
Jan Djärv 2014-11-02 19:45:50 +01:00
parent 65bb8d055c
commit 860ae4521f
2 changed files with 5 additions and 0 deletions

View file

@ -1,5 +1,8 @@
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,
imageListSetNext, imageListNext.

View file

@ -174,6 +174,7 @@ @implementation EmacsImage
image = [[EmacsImage alloc] initByReferencingFile:
[NSString stringWithUTF8String: SSDATA (found)]];
image->bmRep = nil;
#ifdef NS_IMPL_COCOA
imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
#else
@ -199,6 +200,7 @@ @implementation EmacsImage
- (void)dealloc
{
[stippleMask release];
[bmRep release];
[super dealloc];
}