Revision: 4360
http://skim-app.svn.sourceforge.net/skim-app/?rev=4360&view=rev
Author: hofman
Date: 2008-08-06 19:05:34 +0000 (Wed, 06 Aug 2008)
Log Message:
-----------
Add autorelease pool in +load methods, as you never know.
Modified Paths:
--------------
trunk/NSCell_SKExtensions.m
trunk/NSCharacterSet_SKExtensions.m
trunk/NSScrollView_SKExtensions.m
trunk/NSURL_SKExtensions.m
trunk/PDFAnnotationLink_SKExtensions.m
trunk/PDFAnnotationMarkup_SKExtensions.m
trunk/PDFPage_SKExtensions.m
trunk/SKFindTableView.m
trunk/SKThumbnailTableView.m
trunk/SKTypeSelectHelper.m
Modified: trunk/NSCell_SKExtensions.m
===================================================================
--- trunk/NSCell_SKExtensions.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/NSCell_SKExtensions.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -54,7 +54,9 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalHighlightColorWithFrameInView = (id (*)(id, SEL, NSRect,
id))SKReplaceMethodImplementationFromSelector(self,
@selector(highlightColorWithFrame:inView:),
@selector(replacementHighlightColorWithFrame:inView:), YES);
+ [pool release];
}
@end
Modified: trunk/NSCharacterSet_SKExtensions.m
===================================================================
--- trunk/NSCharacterSet_SKExtensions.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/NSCharacterSet_SKExtensions.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -69,8 +69,10 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if ([self respondsToSelector:@selector(newlineCharacterSet)] == NO)
SKReplaceMethodImplementationFromSelector(self,
@selector(newlineCharacterSet), @selector(replacementNewlineCharacterSet), NO);
+ [pool release];
}
@end
Modified: trunk/NSScrollView_SKExtensions.m
===================================================================
--- trunk/NSScrollView_SKExtensions.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/NSScrollView_SKExtensions.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -103,6 +103,7 @@
}
+ (void)load{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalSetHasHorizontalScroller = (void (*)(id, SEL,
BOOL))SKReplaceMethodImplementationFromSelector(self,
@selector(setHasHorizontalScroller:),
@selector(replacementSetHasHorizontalScroller:), YES);
originalSetAutohidesScrollers = (void (*)(id, SEL,
BOOL))SKReplaceMethodImplementationFromSelector(self,
@selector(setAutohidesScrollers:),
@selector(replacementSetAutohidesScrollers:), YES);
originalDealloc = (void (*)(id,
SEL))SKReplaceMethodImplementationFromSelector(self, @selector(dealloc),
@selector(replacementDealloc), YES);
@@ -110,6 +111,7 @@
// dictionary doesn't retain keys, so no retain cycles; pointer equality
used to compare views
scrollViewPlacards = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0,
NULL, &kCFTypeDictionaryValueCallBacks);
+ [pool release];
}
- (NSArray *)placards {
Modified: trunk/NSURL_SKExtensions.m
===================================================================
--- trunk/NSURL_SKExtensions.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/NSURL_SKExtensions.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -55,8 +55,10 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalInitFileURLWithPath = (id (*)(id, SEL,
id))SKReplaceMethodImplementationFromSelector(self,
@selector(initFileURLWithPath:), @selector(replacementInitFileURLWithPath:),
YES);
originalInitWithString = (id (*)(id, SEL,
id))SKReplaceMethodImplementationFromSelector(self, @selector(initWithString:),
@selector(replacementInitWithString:), YES);
+ [pool release];
}
+ (NSURL *)URLFromPasteboardAnyType:(NSPasteboard *)pasteboard {
Modified: trunk/PDFAnnotationLink_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLink_SKExtensions.m 2008-08-06 16:10:29 UTC (rev
4359)
+++ trunk/PDFAnnotationLink_SKExtensions.m 2008-08-06 19:05:34 UTC (rev
4360)
@@ -61,10 +61,12 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if ([self instancesRespondToSelector:@selector(toolTip)])
originalToolTip = (id (*)(id,
SEL))SKReplaceMethodImplementationFromSelector(self, @selector(toolTip),
@selector(replacementToolTip), YES);
if ([self instancesRespondToSelector:@selector(toolTipNoLabel)])
originalToolTipNoLabel = (id (*)(id,
SEL))SKReplaceMethodImplementationFromSelector(self, @selector(toolTip),
@selector(replacementToolTipNoLabel), YES);
+ [pool release];
}
- (BOOL)isLink { return YES; }
Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m 2008-08-06 16:10:29 UTC (rev
4359)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m 2008-08-06 19:05:34 UTC (rev
4360)
@@ -123,10 +123,12 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalDealloc = (void (*)(id,
SEL))SKReplaceMethodImplementationFromSelector(self, @selector(dealloc),
@selector(replacementDealloc), YES);
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_4)
originalDrawWithBoxInContext = (void (*)(id, SEL, CGPDFBox,
CGContextRef))SKReplaceMethodImplementationFromSelector(self,
@selector(drawWithBox:inContext:),
@selector(replacementDrawWithBox:inContext:), YES);
lineRectsDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, NULL,
&kCFTypeDictionaryValueCallBacks);
+ [pool release];
}
- (CFMutableArrayRef)lineRects {
Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/PDFPage_SKExtensions.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -74,8 +74,10 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalDealloc = (void (*)(id,
SEL))SKReplaceMethodImplementationFromSelector(self, @selector(dealloc),
@selector(replacementDealloc), YES);
bboxCache = CFDictionaryCreateMutable(NULL, 0, NULL,
&kSKNSRectDictionaryValueCallBacks);
+ [pool release];
}
// mainly useful for drawing the box in a PDFView while debugging
Modified: trunk/SKFindTableView.m
===================================================================
--- trunk/SKFindTableView.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/SKFindTableView.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -172,7 +172,9 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalDrawWithFrameInView = (void (*)(id, SEL, NSRect,
id))SKReplaceMethodImplementationFromSelector(self,
@selector(drawWithFrame:inView:), @selector(replacementDrawWithFrame:inView:),
YES);
+ [pool release];
}
@end
Modified: trunk/SKThumbnailTableView.m
===================================================================
--- trunk/SKThumbnailTableView.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/SKThumbnailTableView.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -58,7 +58,9 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalTrackKnob = (void (*)(id, SEL,
id))SKReplaceMethodImplementationFromSelector(self, @selector(trackKnob:),
@selector(replacementTrackKnob:), YES);
+ [pool release];
}
@end
Modified: trunk/SKTypeSelectHelper.m
===================================================================
--- trunk/SKTypeSelectHelper.m 2008-08-06 16:10:29 UTC (rev 4359)
+++ trunk/SKTypeSelectHelper.m 2008-08-06 19:05:34 UTC (rev 4360)
@@ -428,7 +428,9 @@
}
+ (void)load {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
originalMakeFirstResponder =
(typeof(originalMakeFirstResponder))SKReplaceMethodImplementationFromSelector(self,
@selector(makeFirstResponder:), @selector(replacementMakeFirstResponder:),
YES);
+ [pool release];
}
@end
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit