mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 22:49:19 +00:00
Fix memory leak introduced by last patch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26441 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3811a82a38
commit
67c69e63da
2 changed files with 16 additions and 3 deletions
|
@ -32,6 +32,11 @@
|
|||
#include "AppKit/NSOpenGL.h"
|
||||
#include "AppKit/NSOpenGLView.h"
|
||||
|
||||
// Declare a private method of NSView
|
||||
@interface NSView (Private)
|
||||
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect;
|
||||
@end
|
||||
|
||||
/**
|
||||
<unit>
|
||||
<heading>NSOpenGLView</heading>
|
||||
|
@ -118,9 +123,12 @@ static NSOpenGLPixelFormatAttribute attrs[] =
|
|||
{
|
||||
if (glcontext == nil)
|
||||
{
|
||||
[self setOpenGLContext:
|
||||
[[NSOpenGLContext alloc] initWithFormat: pixel_format
|
||||
shareContext: nil]];
|
||||
NSOpenGLContext *context = [[NSOpenGLContext alloc]
|
||||
initWithFormat: pixel_format
|
||||
shareContext: nil];
|
||||
|
||||
[self setOpenGLContext: context];
|
||||
RELEASE(context);
|
||||
}
|
||||
return glcontext;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue