Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Finally figured out how to use autorelease pools.
  • Loading branch information
egottlieb committed Aug 6, 2010
1 parent 55566a8 commit 7302cd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/cocoa/SDL_cocoashape.m
Expand Up @@ -86,13 +86,13 @@ int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowS

data->shape = SDL_CalculateShapeTree(*shapeMode,shape,SDL_FALSE);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSBezierPath* clipPath = [[NSBezierPath bezierPath] autorelease];
NSBezierPath* clipPath = [NSBezierPath bezierPath];

SDL_PathConglomeration cong = {clipPath,shaper->window};

SDL_TraverseShapeTree(data->shape,(SDL_TraversalFunction)&ConglomerateShapeTree,(void*)&cong);

SDL_assert([NSGraphicsContext currentContext] != NULL);
SDL_assert([NSGraphicsContext currentContext] != Nil);
[clipPath addClip];

[NSGraphicsContext restoreGraphicsState];
Expand Down

0 comments on commit 7302cd5

Please sign in to comment.