Small memory fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26580 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-05-27 22:29:25 +00:00
parent 3b97bdc79f
commit 372d5ec635
3 changed files with 16 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2008-05-28 Fred Kiefer <FredKiefer@gmx.de>
* Source/cairo/CairoGState.m (-copyWithZone:): Avoid double
allocation of dashes memory.
* Source/gsc/GSGState.m (-DPSrectfill::::, -DPSrectstroke::::,
-DPSrectclip::::): Don't use autoreleased objects.
2008-05-27 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XGServerWindow.m (check_modifier,

View file

@ -189,7 +189,6 @@ static float floatToUserSpace(NSAffineTransform *ctm, float f)
double dash_offset;
GS_BEGINITEMBUF(dashes, num_dashes, double);
dashes = (double *)malloc(sizeof(double) * num_dashes);
cairo_get_dash(_ct, dashes, &dash_offset);
cairo_set_dash (copy->_ct, dashes, num_dashes, dash_offset);
GS_ENDITEMBUF();

View file

@ -981,9 +981,11 @@ typedef enum {
{
NSBezierPath *oldPath = path;
path = [NSBezierPath bezierPathWithRect: NSMakeRect(x, y, w, h)];
path = [[NSBezierPath alloc] init];
[path appendBezierPathWithRect: NSMakeRect(x, y, w, h)];
[path transformUsingAffineTransform: ctm];
[self DPSclip];
RELEASE(path);
path = oldPath;
if (path)
[path removeAllPoints];
@ -993,9 +995,11 @@ typedef enum {
{
NSBezierPath *oldPath = path;
path = [NSBezierPath bezierPathWithRect: NSMakeRect(x, y, w, h)];
path = [[NSBezierPath alloc] init];
[path appendBezierPathWithRect: NSMakeRect(x, y, w, h)];
[path transformUsingAffineTransform: ctm];
[self DPSfill];
RELEASE(path);
path = oldPath;
}
@ -1003,9 +1007,11 @@ typedef enum {
{
NSBezierPath *oldPath = path;
path = [NSBezierPath bezierPathWithRect: NSMakeRect(x, y, w, h)];
path = [[NSBezierPath alloc] init];
[path appendBezierPathWithRect: NSMakeRect(x, y, w, h)];
[path transformUsingAffineTransform: ctm];
[self DPSstroke];
RELEASE(path);
path = oldPath;
}