aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2014-11-02 19:45:50 +0100
committerJan Djärv2014-11-02 19:45:50 +0100
commit860ae4521f69729e5e94f567a95bd790872b888b (patch)
tree3245d18243846c44de927ecafb538997a8e3d1ae /src
parent65bb8d055cefa5e4d921e6a24fc12071324f663d (diff)
downloademacs-860ae4521f69729e5e94f567a95bd790872b888b.tar.gz
emacs-860ae4521f69729e5e94f567a95bd790872b888b.zip
Fix memory leak
* nsimage.m (allocInitFromFile:): Initialize bmRep. (dealloc): Release bmRep.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/nsimage.m2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 07bb1e3fc85..2f719681afb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12014-11-02 Jan Djärv <jan.h.d@swipnet.se> 12014-11-02 Jan Djärv <jan.h.d@swipnet.se>
2 2
3 * nsimage.m (allocInitFromFile:): Initialize bmRep.
4 (dealloc): Release bmRep.
5
3 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference, 6 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
4 imageListSetNext, imageListNext. 7 imageListSetNext, imageListNext.
5 8
diff --git a/src/nsimage.m b/src/nsimage.m
index 5bbf9fb49cd..580d8f327c2 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -174,6 +174,7 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
174 image = [[EmacsImage alloc] initByReferencingFile: 174 image = [[EmacsImage alloc] initByReferencingFile:
175 [NSString stringWithUTF8String: SSDATA (found)]]; 175 [NSString stringWithUTF8String: SSDATA (found)]];
176 176
177 image->bmRep = nil;
177#ifdef NS_IMPL_COCOA 178#ifdef NS_IMPL_COCOA
178 imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; 179 imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
179#else 180#else
@@ -199,6 +200,7 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
199- (void)dealloc 200- (void)dealloc
200{ 201{
201 [stippleMask release]; 202 [stippleMask release];
203 [bmRep release];
202 [super dealloc]; 204 [super dealloc];
203} 205}
204 206