Revision: 28635
http://sourceforge.net/p/bibdesk/svn/28635
Author: hofman
Date: 2024-01-21 17:00:31 +0000 (Sun, 21 Jan 2024)
Log Message:
-----------
Enable ARC in FileView. Add some final bridgings, remove retain, release,
autorelease, and partial dealloc.
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/Configurations/FileView-Common.xcconfig
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAliasBadge.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBaseIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.h
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIconOperation.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.h
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMovieIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPlaceholderImage.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.h
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQuickLookIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVScaledImageView.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVSlider.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVThread.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView Program/Controller.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView Program/FileView
Program-Info.plist
trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.xcodeproj/project.pbxproj
trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVPreviewerWindow.m
trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.h
trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.m
Modified:
trunk/bibdesk_vendorsrc/amaxwell/FileView/Configurations/FileView-Common.xcconfig
===================================================================
---
trunk/bibdesk_vendorsrc/amaxwell/FileView/Configurations/FileView-Common.xcconfig
2024-01-20 16:03:45 UTC (rev 28634)
+++
trunk/bibdesk_vendorsrc/amaxwell/FileView/Configurations/FileView-Common.xcconfig
2024-01-21 17:00:31 UTC (rev 28635)
@@ -6,7 +6,7 @@
ZERO_LINK = NO
COMBINE_HIDPI_IMAGES = YES
-CLANG_ENABLE_OBJC_WEAK = YES
+CLANG_ENABLE_OBJC_ARC = YES
ALWAYS_SEARCH_USER_PATHS = NO
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAliasBadge.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAliasBadge.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAliasBadge.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -92,7 +92,7 @@
NSUInteger i, iMax = sizeof(_sizes) / sizeof(NSUInteger);
for (i = 0; i < iMax; i++)
if (_sizes[i] >= height) break;
- return (CGLayerRef)[_badges objectAtIndex:MIN(i, count - 1)];
+ return (CGLayerRef)(__bridge CGLayerRef)[_badges objectAtIndex:MIN(i,
count - 1)];
}
@end
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBaseIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBaseIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBaseIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -51,7 +51,7 @@
self = [self init];
if (self) {
_drawsLinkBadge = drawsLinkBadge;
- _fileURL = [aURL retain];
+ _fileURL = aURL;
_cacheKey = [FVCGImageCache newKeyForURL:_fileURL];
pthread_mutex_init(&_mutex, NULL);
}
@@ -61,9 +61,6 @@
- (void)dealloc
{
pthread_mutex_destroy(&_mutex);
- [_fileURL release];
- [_cacheKey release];
- [super dealloc];
}
- (BOOL)tryLock { return pthread_mutex_trylock(&_mutex) == 0; }
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.h 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.h 2024-01-21
17:00:31 UTC (rev 28635)
@@ -72,7 +72,7 @@
/** @internal @brief Core Graphics context.
@return CGContext owned by FVBitmapContext. */
-@property (nonatomic, readonly) CGContextRef graphicsPort;
+@property (nonatomic, readonly) CGContextRef graphicsPort
NS_RETURNS_INNER_POINTER;
/** @internal @brief Unflipped Cocoa graphics context.
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -71,17 +71,14 @@
+ (FVBitmapContext *)bitmapContextWithSize:(NSSize)pixelSize;
{
- return [[[self alloc] initPixelsWide:pixelSize.width
pixelsHigh:pixelSize.height] autorelease];
+ return [[self alloc] initPixelsWide:pixelSize.width
pixelsHigh:pixelSize.height];
}
- (void)dealloc
{
- [_flipped release];
- [_context release];
void *bitmapData = CGBitmapContextGetData(_port);
if (bitmapData) CFAllocatorDeallocate(FVAllocatorGetDefault(), bitmapData);
CGContextRelease(_port);
- [super dealloc];
}
- (CGContextRef)graphicsPort;
@@ -93,7 +90,7 @@
- (NSGraphicsContext *)graphicsContext;
{
if (nil == _context)
- _context = [[NSGraphicsContext graphicsContextWithGraphicsPort:[self
graphicsPort] flipped:NO] retain];
+ _context = [NSGraphicsContext graphicsContextWithGraphicsPort:[self
graphicsPort] flipped:NO];
FVAPIParameterAssert(nil != _context);
return _context;
}
@@ -101,7 +98,7 @@
- (NSGraphicsContext *)flippedGraphicsContext;
{
if (nil == _flipped)
- _flipped = [[NSGraphicsContext graphicsContextWithGraphicsPort:[self
graphicsPort] flipped:YES] retain];
+ _flipped = [NSGraphicsContext graphicsContextWithGraphicsPort:[self
graphicsPort] flipped:YES];
FVAPIParameterAssert(nil != _flipped);
return _flipped;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -84,7 +84,6 @@
- (void)dealloc
{
NSZoneFree(NULL, _colorTable);
- [super dealloc];
}
- (CGColorSpaceRef)_newDeviceColorSpaceForComponents:(size_t)components
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -87,7 +87,6 @@
FVCacheFile *cacheFile = _cacheFile;
_cacheFile = nil;
[cacheFile closeFile];
- [cacheFile release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@@ -94,7 +93,6 @@
- (void)dealloc
{
NSLog(@"*** error *** attempt to deallocate FVCGImageCache");
- if (0) [super dealloc];
}
- (CGImageRef)newImageForKey:(id)aKey;
@@ -101,7 +99,6 @@
{
NSData *data = [_cacheFile copyDataForKey:aKey];
CGImageRef image = FVCreateCGImageWithData(data);
- [data release];
return image;
}
@@ -187,7 +184,6 @@
// only retained by unarchiver
FVCGImageDescription *imageDescription = [unarchiver decodeObject];
toReturn = [imageDescription newImage];
- [unarchiver release];
#endif
return toReturn;
}
@@ -211,11 +207,8 @@
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc]
initForWritingWithMutableData:mdata];
[archiver encodeObject:imageDescription];
[archiver finishEncoding];
- [imageDescription release];
- [archiver release];
data = (CFDataRef)CFBridgingRetain(mdata);
- [mdata release];
#endif
return data;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -78,7 +78,7 @@
}
else {
// wrap in a non-copying, non-freeing CFData for archiving access
- _bitmapData = CFDataCreateWithBytesNoCopy(CFGetAllocator(self),
_bitmapPtr, _bitmapPtrSize, kCFAllocatorNull);
+ _bitmapData = CFDataCreateWithBytesNoCopy(CFAllocatorGetDefault(),
_bitmapPtr, _bitmapPtrSize, kCFAllocatorNull);
}
NSAssert3((size_t)CFDataGetLength(_bitmapData) == _bytesPerRow *
_height, @"strange data length %ld for %@ (should be >= %lu)",
CFDataGetLength(_bitmapData), _image, (unsigned long)(_bytesPerRow * _height));
@@ -88,12 +88,10 @@
- (void)dealloc
{
- [_colorSpaceDescription release];
if (_bitmapData) CFRelease(_bitmapData);
if (_bitmapPtr) __FVCGImageReleaseBytePtr(_image);
NSZoneFree(NULL, _decode);
CGImageRelease(_image);
- [super dealloc];
}
- (CGImageRef)newImage;
@@ -166,8 +164,8 @@
_bitmapInfo = [aDecoder decodeIntegerForKey:@"_bitmapInfo"];
_shouldInterpolate = [aDecoder
decodeIntegerForKey:@"_shouldInterpolate"];
_renderingIntent = (CGColorRenderingIntent)[aDecoder
decodeIntegerForKey:@"_renderingIntent"];
- _colorSpaceDescription = [[aDecoder
decodeObjectForKey:@"_colorSpaceDescription"] retain];
- _bitmapData = (CFDataRef)[[aDecoder
decodeObjectForKey:@"_bitmapData"] retain];
+ _colorSpaceDescription = [aDecoder
decodeObjectForKey:@"_colorSpaceDescription"];
+ _bitmapData = (CFDataRef)CFBridgingRetain([aDecoder
decodeObjectForKey:@"_bitmapData"]);
_image = NULL;
@@ -190,7 +188,7 @@
[aDecoder decodeValueOfObjCType:@encode(CGBitmapInfo)
at:&_bitmapInfo];
[aDecoder decodeValueOfObjCType:@encode(bool)
at:&_shouldInterpolate];
[aDecoder decodeValueOfObjCType:@encode(CGColorRenderingIntent)
at:&_renderingIntent];
- _colorSpaceDescription = [[aDecoder decodeObject] retain];
+ _colorSpaceDescription = [aDecoder decodeObject];
size_t bitmapLength;
[aDecoder decodeValueOfObjCType:@encode(size_t) at:&bitmapLength];
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm
2024-01-21 17:00:31 UTC (rev 28635)
@@ -857,7 +857,6 @@
imageBuffer = [[FVImageBuffer alloc] initWithWidth:maxWidth
height:maxHeight bytesPerSample:1];
if (imageBuffer) {
[planarTilesA addObject:imageBuffer];
- [imageBuffer release];
}
else {
ret = kvImageMemoryAllocationError;
@@ -866,7 +865,6 @@
imageBuffer = [[FVImageBuffer alloc] initWithWidth:maxWidth
height:maxHeight bytesPerSample:1];
if (imageBuffer) {
[planarTilesB addObject:imageBuffer];
- [imageBuffer release];
}
else {
ret = kvImageMemoryAllocationError;
@@ -902,7 +900,6 @@
imageBuffer = [[FVImageBuffer alloc] initWithWidth:(regions[j].w *
ceil(scale)) height:(regions[j].h * ceil(scale)) bytesPerSample:4];
if (imageBuffer) {
[currentRegionRow addObject:imageBuffer];
- [imageBuffer release];
}
else {
ret = kvImageMemoryAllocationError;
@@ -938,10 +935,10 @@
}
// deinterleave a region of the image, using regionBuffer for
temporary memory
- if (kCGImageAlphaNone == alphaInfo && false == isIndexedImage)
+ if (isIndexedImage)
+ ret = __FVConvertIndexedImageRegionToPlanar8_buffers(image,
srcBytes, imageBytesPerRow, region, planarTilesA);
+ else if (kCGImageAlphaNone == alphaInfo)
ret = __FVConvertRGB888ImageRegionToPlanar8_buffers(image,
srcBytes, imageBytesPerRow, region, regionBuffer, planarTilesA);
- else if (isIndexedImage)
- ret = __FVConvertIndexedImageRegionToPlanar8_buffers(image,
srcBytes, imageBytesPerRow, region, planarTilesA);
else
ret = __FVConvertARGB8888ImageRegionToPlanar8_buffers(image,
srcBytes, imageBytesPerRow, region, regionBuffer, planarTilesA);
@@ -1020,15 +1017,10 @@
}
// cleanup is safe now
-
// dispose of the tiles
- [planarTilesA release];
- [planarTilesB release];
- [currentRegionRow release];
+ planarTilesA = nil;
+ planarTilesB = nil;
- // could probably cache a few of these
- [regionBuffer release];
-
#if FV_LIMIT_TILEMEMORY_USAGE
__FVCGImageDiscardAllocationSize(0);
#endif
@@ -1054,9 +1046,6 @@
CGDataProviderRelease(provider);
CGColorSpaceRelease(cspace);
- // memory is now transferred to NSData
- [interleavedImageBuffer release];
-
if (kvImageNoError != ret)
FVLog(@"%s: error %ld scaling image to %ld x %ld pixels", __func__,
ret, ssize_t(desiredSize.width), ssize_t(desiredSize.height));
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm 2024-01-21
17:00:31 UTC (rev 28635)
@@ -146,7 +146,7 @@
if (-1 != _fileDescriptor) {
fcntl(_fileDescriptor, F_NOCACHE, 1);
- _path = [(NSString
*)CFBridgingRelease(CFStringCreateWithFileSystemRepresentation(NULL, tempName))
retain];
+ _path = (NSString
*)CFBridgingRelease(CFStringCreateWithFileSystemRepresentation(NULL, tempName));
FVAPIAssert1(FVCanMapFileAtURL([NSURL fileURLWithPath:_path]),
@"%@ is not safe for mmap()", _path);
// Unlink the file immediately so we don't leave turds when the
program crashes.
@@ -162,7 +162,6 @@
}
else {
NSLog(@"*** ERROR *** unable to open file %@", _path);
- [self release];
self = nil;
}
free(tempName);
@@ -178,13 +177,7 @@
// owner is responsible for calling -closeFile at the appropriate time,
and _readers is deleted in closeFile
//if (-1 != _fileDescriptor)
// NSLog(@"*** WARNING *** failed to close %@ before deallocating;
leaking file descriptor", self);
- [_cacheName release];
- [_path release];
if (_deflateBuffer) delete [] _deflateBuffer;
- [_writeLock release];
- [_offsetTable release];
- [_eventTable release];
- [super dealloc];
}
- (void)_writeLogEventsIfNeeded
@@ -243,7 +236,6 @@
- (void)setName:(NSString *)name
{
- [_cacheName autorelease];
_cacheName = [name copy];
}
@@ -280,7 +272,6 @@
rec->_count = 1;
rec->_identifier = (CFStringRef)CFRetain(identifier);
[_eventTable setObject:rec forKey:(__bridge id)identifier];
- [rec release];
}
if (identifier) CFRelease(identifier);
@@ -373,7 +364,6 @@
else {
perror("failed to write data");
}
- [location release];
}
[_writeLock unlock];
}
@@ -385,7 +375,7 @@
NSData *data = nil;
// retain to avoid losing this in case -invalidateDataForKey: is called
- _FVCacheLocation *location = [[_offsetTable objectForKey:aKey] retain];
+ _FVCacheLocation *location = [_offsetTable objectForKey:aKey];
if (location) {
@@ -415,7 +405,6 @@
if ((mapregion = mmap(0, mapLength, PROT_READ, MAP_SHARED,
_fileDescriptor, location->_offset)) == MAP_FAILED) {
perror("mmap failed");
CFAllocatorDeallocate(FVAllocatorGetDefault(), bytes);
- [location release];
return nil;
}
@@ -448,7 +437,7 @@
NSParameterAssert(strm.total_out == location->_decompressedLength);
// transfer ownership to NSData in order to avoid copying
- data =
[(id)CFBridgingRelease(CFDataCreateWithBytesNoCopy(CFAllocatorGetDefault(),
(const uint8_t *)bytes, location->_decompressedLength,
FVAllocatorGetDefault())) retain];
+ data =
(id)CFBridgingRelease(CFDataCreateWithBytesNoCopy(CFAllocatorGetDefault(),
(const uint8_t *)bytes, location->_decompressedLength,
FVAllocatorGetDefault()));
}
else {
FVLog(@"Unable to malloc %ld bytes in -[FVCacheFile
copyDataForKey:] with key %@", (unsigned long)location->_decompressedLength,
aKey);
@@ -456,7 +445,6 @@
NSParameterAssert([data length] == location->_decompressedLength);
- [location release];
}
return data;
@@ -521,22 +509,17 @@
}
// technically only required for isEqual: if noErr != err, but useful
for description
- _URL = [aURL retain];
+ _URL = aURL;
}
return self;
}
-- (void)dealloc
-{
- [_URL release];
- [super dealloc];
-}
- (NSString *)description { return [_URL absoluteString]; }
- (id)copyWithZone:(NSZone *)aZone
{
- return [self retain];
+ return self;
}
- (BOOL)isEqual:(_FVCacheKey *)other
@@ -562,7 +545,6 @@
- (void)dealloc
{
CFRelease(_identifier);
- [super dealloc];
}
- (NSString *)description { return [NSString stringWithFormat:@"%.2f kilobytes
in %ld files", _kbytes, (unsigned long)_count]; }
- (NSUInteger)hash { return CFHash(_identifier); }
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -76,7 +76,7 @@
+ (FVColorMenuView *)menuView;
{
- return [[[self alloc] initWithFrame:DEFAULT_FRAME] autorelease];
+ return [[self alloc] initWithFrame:DEFAULT_FRAME];
}
- (void)_createMatrix
@@ -85,7 +85,6 @@
[_matrix setTarget:self];
[_matrix setAction:@selector(fvLabelColorAction:)];
[self addSubview:_matrix];
- [_matrix release];
}
- (id)initWithFrame:(NSRect)aRect
@@ -136,8 +135,8 @@
if (self = [super initWithCoder:coder]) {
// the following should be unarchived as a subview, so no need to
retain them
_matrix = [coder decodeObjectForKey:@"_matrix"];
- _labelCell = [[coder decodeObjectForKey:@"_labelCell"] retain];
- _labelNameCell = [[coder decodeObjectForKey:@"_labelNameCell"] retain];
+ _labelCell = [coder decodeObjectForKey:@"_labelCell"];
+ _labelNameCell = [coder decodeObjectForKey:@"_labelNameCell"];
_target = [coder decodeObjectForKey:@"_target"];
_action = NSSelectorFromString([coder decodeObjectForKey:@"_action"]);
@@ -154,9 +153,6 @@
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [_labelCell release];
- [_labelNameCell release];
- [super dealloc];
}
- (BOOL)isFlipped { return YES; }
@@ -342,7 +338,7 @@
- (id)initWithFrame:(NSRect)frameRect
{
if (self = [super initWithFrame:frameRect]) {
- [self setPrototype:[[[FVColorMenuCell alloc] initTextCell:@""]
autorelease]];
+ [self setPrototype:[[FVColorMenuCell alloc] initTextCell:@""]];
[self setCellSize:CELL_SIZE];
[self setIntercellSpacing:NSMakeSize(2.0, 4.0)];
[self setMode:NSRadioModeMatrix];
@@ -357,7 +353,7 @@
- (void)removeTrackingAreas
{
- for (NSTrackingArea *area in [[[self trackingAreas] copy] autorelease])
+ for (NSTrackingArea *area in [[self trackingAreas] copy])
[self removeTrackingArea:area];
}
@@ -375,7 +371,6 @@
NSRect cellFrame = [self cellFrameAtRow:r column:c];
NSTrackingArea *area = [[NSTrackingArea alloc]
initWithRect:cellFrame options:options owner:self userInfo:nil];
[self addTrackingArea:area];
- [area release];
}
}
}
@@ -426,7 +421,7 @@
- (NSArray *)accessibilityAttributeNames {
static NSArray *attributes = nil;
if (attributes == nil)
- attributes = [[[super accessibilityAttributeNames]
arrayByAddingObject:NSAccessibilityTitleAttribute] retain];
+ attributes = [[super accessibilityAttributeNames]
arrayByAddingObject:NSAccessibilityTitleAttribute];
return attributes;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -138,10 +138,6 @@
- (void)dealloc
{
FVAPIAssert1(YES == FVAtomicLoad(_terminate), @"*** ERROR *** attempt to
deallocate %@ without calling -terminate", self);
- [_threadLock release];
- [_pendingOperations release];
- [_activeOperations release];
- [super dealloc];
}
- (void)handleAppTerminate:(NSNotification *)aNote
@@ -176,7 +172,6 @@
// make sure it runs on our worker thread, not some ephemeral thread!
[op setConcurrent:NO];
[self addOperation:op];
- [op release];
}
// __CFSendTrivialMachMessage copied from CFRunLoop.c
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -91,13 +91,6 @@
return a / b;
}
-- (void)dealloc
-{
- [_downloadURL release];
- [_fileURL release];
- [super dealloc];
-}
-
- (NSUInteger)hash { return _indexInView; }
- (BOOL)isEqual:(FVDownload *)other
{
@@ -108,7 +101,6 @@
{
NSAssert1(nil == _fileURL, @"Error: attempt to set _fileURL when it is
already set to %@", _fileURL);
NSParameterAssert([fileURL isFileURL]);
- [_fileURL autorelease];
_fileURL = [fileURL copy];
}
@@ -129,7 +121,6 @@
- (void)cancel
{
[_download cancel];
- [_download release];
_download = nil;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -307,8 +307,7 @@
} else if ([NSOutlineView
instancesRespondToSelector:@selector(setSelectionHighlightStyle:)]) {
NSOutlineView *outlineView = [[NSOutlineView alloc]
initWithFrame:NSMakeRect(0,0,1,1)];
[outlineView
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList];
- color = [[[outlineView backgroundColor] retain] autorelease];
- [outlineView release];
+ color = [outlineView backgroundColor];
}
else {
// from Mail.app on 10.4
@@ -466,41 +465,17 @@
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self _invalidateProgressTimer];
- [_titleCell release];
- [_subtitleCell release];
- [_arrowAnimation stopAnimation];
- [_leftArrow release];
- [_rightArrow release];
CFRunLoopTimerInvalidate(_zombieTimer);
CFRelease(_zombieTimer);
- [_iconCache release];
- [_zombieIconCache release];
- [_orderedIcons release];
- [_orderedURLs release];
- [_orderedSubtitles release];
CFRelease(_infoTable);
- [_selectionIndexes release];
- [_backgroundColor release];
- [_sliderWindow release];
// this variable is accessed in super's dealloc, so set it to NULL
- [_trackingAreas release];
_trackingAreas = nil;
- [_topSliderArea release];
_topSliderArea = nil;
- [_topSliderArea release];
_topSliderArea = nil;
// takes care of the timer as well
[self _cancelDownloads];
- [_downloads release];
- [_progressIndicators release];
- [_accessibilityIcons release];
- [_modificationSet release];
- [_modificationLock release];
[_operationQueue terminate];
- [_operationQueue release];
CGLayerRelease(_selectionOverlay);
- [_backgroundView release];
- [super dealloc];
}
- (BOOL)isFlipped { return YES; }
@@ -510,7 +485,6 @@
- (void)setBackgroundColor:(NSColor *)aColor;
{
if (_backgroundColor != aColor) {
- [_backgroundColor release];
_backgroundColor = [aColor copy];
[_backgroundView setBackgroundColor:_backgroundColor];
}
@@ -731,7 +705,6 @@
[[_sliderWindow slider] setDoubleValue:log([self iconScale])];
} else {
[_sliderWindow orderOut:nil];
- [_sliderWindow release];
_sliderWindow = nil;
}
}
@@ -771,7 +744,6 @@
[self _cancelDownloads];
- [_orderedSubtitles release];
_orderedSubtitles = [obj
respondsToSelector:@selector(fileView:subtitleAtIndex:)] ? [[NSMutableArray
alloc] init] : nil;
// convenient time to do this, although the timer would also handle it
@@ -813,7 +785,6 @@
_downloads = [[NSMutableArray alloc] init];
} else if (flag == NO && _downloads != nil) {
[self _cancelDownloads];
- [_downloads release];
_downloads = nil;
}
}
@@ -827,7 +798,6 @@
{
FVAPIAssert(nil != indexSet, @"index set must not be nil");
if (indexSet != _selectionIndexes) {
- [_selectionIndexes release];
_selectionIndexes = [[NSIndexSet alloc] initWithIndexSet:indexSet];
[self setNeedsDisplay:YES];
@@ -842,7 +812,6 @@
- (void)setIconURLs:(NSArray *)array
{
if (_orderedURLs != array) {
- [_orderedURLs release];
_orderedURLs = [[NSMutableArray alloc] initWithArray:array];
}
}
@@ -886,7 +855,6 @@
if (nil == info) {
info = [[_FVURLInfo alloc] initWithURL:aURL];
CFDictionarySetValue(_infoTable, (__bridge CFURLRef)aURL, (__bridge
void *)info);
- [info release];
}
if (name) *name = [info name];
if (label) *label = [info label];
@@ -910,7 +878,6 @@
if (nil == icon) {
icon = [[FVIcon alloc] initWithURL:aURL];
[_iconCache setObject:icon forKey:aURL];
- [icon release];
}
return icon;
}
@@ -935,7 +902,7 @@
FVAPIAssert3(nil == _contentBinding, @"attempt to bind %@ to %@ when
bound to %@", keyPath, observable, [_contentBinding
objectForKey:NSObservedObjectKey]);
// keep a record of the observervable object for unbinding; this is
strictly for observation, not a manual binding
- _contentBinding = [[NSDictionary alloc]
initWithObjectsAndKeys:observable, NSObservedObjectKey, [[keyPath copy]
autorelease], NSObservedKeyPathKey, [[options copy] autorelease], NSOptionsKey,
nil];
+ _contentBinding = [[NSDictionary alloc]
initWithObjectsAndKeys:observable, NSObservedObjectKey, [keyPath copy],
NSObservedKeyPathKey, [options copy], NSOptionsKey, nil];
[observable addObserver:self forKeyPath:keyPath options:0
context:&_FVFileViewContentObservationContext];
[self observeValueForKeyPath:keyPath ofObject:observable change:nil
context:&_FVFileViewContentObservationContext];
}
@@ -951,7 +918,6 @@
FVAPIAssert2(nil != _contentBinding, @"%@: attempt to unbind %@ when
unbound", self, binding);
[[_contentBinding objectForKey:NSObservedObjectKey]
removeObserver:self forKeyPath:[_contentBinding
objectForKey:NSObservedKeyPathKey]];
- [_contentBinding release];
_contentBinding = nil;
[self setIconURLs:nil];
@@ -1073,7 +1039,6 @@
if (_backgroundView) {
[_backgroundView removeFromSuperview];
- [_backgroundView release];
_backgroundView = nil;
}
@@ -1600,12 +1565,10 @@
}
if (_topSliderArea) {
[self removeTrackingArea:_topSliderArea];
- [_topSliderArea release];
_topSliderArea = nil;
}
if (_bottomSliderArea) {
[self removeTrackingArea:_bottomSliderArea];
- [_bottomSliderArea release];
_bottomSliderArea = nil;
}
}
@@ -1635,7 +1598,6 @@
NSTrackingArea *area = [[NSTrackingArea alloc]
initWithRect:rect options:options owner:self userInfo:nil];
[self addTrackingArea:area];
[_trackingAreas addObject:area];
- [area release];
// don't pass the URL as owner, as it's not retained; use
the delegate method instead
[self addToolTipRect:rect owner:self userData:(void *)i];
@@ -1769,7 +1731,6 @@
redisplay = true;
}
[_modificationSet addObject:newKey];
- [newKey release];
}
}
@@ -1799,8 +1760,6 @@
NSArray *orderedIcons = [[NSArray alloc] initWithArray:_orderedIcons
copyItems:NO];
NSArray *orderedURLs = [[NSArray alloc] initWithArray:_orderedURLs
copyItems:NO];
NSDictionary *info = [NSDictionary
dictionaryWithObjectsAndKeys:orderedIcons, @"orderedIcons", orderedURLs,
@"orderedURLs", nil];
- [orderedIcons release];
- [orderedURLs release];
[NSThread detachNewThreadSelector:@selector(_recacheIconsWithInfo:)
toTarget:self withObject:info];
}
}
@@ -1878,7 +1837,6 @@
for (i = accessibilityCount; i < iMax; i++) {
FVAccessibilityIconElement *element = [[FVAccessibilityIconElement
alloc] initWithIndex:i parent:self];
addObject(_accessibilityIcons, addSel, element);
- [element release];
}
} else if (accessibilityCount > iMax) {
[_accessibilityIcons removeObjectsInRange:NSMakeRange(iMax,
accessibilityCount - iMax)];
@@ -1895,7 +1853,6 @@
NSMutableIndexSet *newSelIndexes = [_selectionIndexes mutableCopy];
[newSelIndexes removeIndexesInRange:NSMakeRange(numIcons, lastSelIndex
+ 1 - numIcons)];
[self _setSelectionIndexes:newSelIndexes];
- [newSelIndexes release];
}
else if (_fvFlags.controllingSharedPreviewer ||
_fvFlags.controllingQLPreviewPanel) {
// Content or ordering of selection (may) have changed, so reload any
previews
@@ -1947,12 +1904,10 @@
FVReleaseOperation *op = [[FVReleaseOperation alloc]
initWithIcon:icon view:nil];
[op setQueuePriority:FVOperationQueuePriorityLow];
[operations addObject:op];
- [op release];
}
}
if ([operations count])
[_operationQueue addOperations:operations];
- [operations release];
}
- (void)_enqueueRenderOperationForIcons:(NSArray *)icons
withPriority:(FVOperationQueuePriority)priority;
@@ -1967,12 +1922,10 @@
FVRenderOperation *op = [[FVRenderOperation alloc]
initWithIcon:icon view:self size:size];
[op setQueuePriority:priority];
[operations addObject:op];
- [op release];
}
}
if ([operations count])
[_operationQueue addOperations:operations];
- [operations release];
}
- (void)iconUpdated:(FVIcon *)updatedIcon;
@@ -2175,8 +2128,7 @@
NSMutableParagraphStyle *ps = [[NSParagraphStyle defaultParagraphStyle]
mutableCopy];
[ps setAlignment:NSTextAlignmentCenter];
NSDictionary *attributes = [NSDictionary
dictionaryWithObjectsAndKeys:[NSFont boldSystemFontOfSize:fontSize],
NSFontAttributeName, ps, NSParagraphStyleAttributeName, nil];
- NSMutableAttributedString *attrString = [[[NSMutableAttributedString
alloc] initWithString:message attributes:attributes] autorelease];
- [ps release];
+ NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]
initWithString:message attributes:attributes];
return attrString;
}
@@ -2384,8 +2336,6 @@
[unusedIcons removeObjectAtIndex:i];
}
[self _enqueueReleaseOperationForIcons:unusedIcons];
- [renderSet release];
- [unusedIcons release];
}
}
@@ -2510,11 +2460,10 @@
// labeled title uses black text for greater
contrast; inset horizontally because of the rounded end caps
// @@ Dark mode
- NSColor *titleColor = [[_titleCell textColor]
retain];
+ NSColor *titleColor = [_titleCell textColor];
[_titleCell setTextColor:[NSColor
controlTextColor]];
[_titleCell drawWithFrame:NSInsetRect(textRect,
titleHeight / 2.0, 0.0) inView:self];
[_titleCell setTextColor:titleColor];
- [titleColor release];
}
else {
[_titleCell drawWithFrame:textRect inView:self];
@@ -2704,7 +2653,7 @@
// only called if we originated the drag, so the row/column must be valid
if ((operation & NSDragOperationDelete) != 0 && operation !=
NSDragOperationEvery && [self isEditable]) {
_fvFlags.needsReload = YES;
- if ([[self dataSource] fileView:self
deleteURLsAtIndexes:[[_selectionIndexes retain] autorelease]]) {
+ if ([[self dataSource] fileView:self
deleteURLsAtIndexes:_selectionIndexes]) {
[self _setSelectionIndexes:[NSIndexSet indexSet]];
if (_fvFlags.needsReload)
[self reloadIcons];
@@ -2751,8 +2700,6 @@
[component setContents:image];
[component setFrame:rect];
[imageComponents addObject:component];
- [image release];
- [component release];
transform = [NSAffineTransform transform];
[transform translateXBy:origin.x - NSMinX(textRect) yBy:origin.y -
NSMinY(textRect)];
@@ -2772,13 +2719,10 @@
[component setContents:image];
[component setFrame:rect];
[imageComponents addObject:component];
- [image release];
- [component release];
return imageComponents;
}];
[dragItems addObject:dragItem];
- [dragItem release];
i = [_selectionIndexes indexGreaterThanIndex:i];
}
@@ -2793,7 +2737,7 @@
// only called if we originated the drag, so the row/column must be valid
if ((operation & NSDragOperationDelete) != 0 && operation !=
NSDragOperationEvery && [self isEditable]) {
_fvFlags.needsReload = YES;
- if ([[self dataSource] fileView:self
deleteURLsAtIndexes:[[_selectionIndexes retain] autorelease]]) {
+ if ([[self dataSource] fileView:self
deleteURLsAtIndexes:_selectionIndexes]) {
[self _setSelectionIndexes:[NSIndexSet indexSet]];
if (_fvFlags.needsReload)
[self reloadIcons];
@@ -2844,7 +2788,7 @@
NSRect bounds = [self bounds];
- NSImage *newImage = [[[NSImage alloc] initWithSize:bounds.size]
autorelease];
+ NSImage *newImage = [[NSImage alloc] initWithSize:bounds.size];
[newImage lockFocusFlipped:YES];
FVRunWithAppearance(self, ^{
[self _drawIconsInRows:NSMakeRange(rMin, rMax + 1 - rMin)
columns:NSMakeRange(cMin, cMax + 1 - cMax) drawOption:FVDrawIcon | FVDrawText];
@@ -2853,7 +2797,7 @@
// redraw with transparency, so it's easier to see a target
NSPoint drawPoint = NSMakePoint(NSMinX(bounds) - NSMinX(rect),
NSMaxY(rect) - NSMaxY(bounds));
- NSImage *dragImage = [[[NSImage alloc] initWithSize:rect.size]
autorelease];
+ NSImage *dragImage = [[NSImage alloc] initWithSize:rect.size];
[dragImage lockFocus];
[newImage drawAtPoint:drawPoint fromRect:NSZeroRect
operation:NSCompositeCopy fraction:0.7];
[dragImage unlockFocus];
@@ -3018,12 +2962,13 @@
downloads = [NSMutableArray array];
for (NSURL *aURL in allURLs) {
+ NSURL *realURL = aURL;
if ([aURL isFileURL])
- aURL = makeCopyOfFileAtURL(aURL);
+ realURL = makeCopyOfFileAtURL(aURL);
else if ([self allowsDownloading])
[downloads addObject:[NSDictionary
dictionaryWithObjectsAndKeys:aURL, @"URL", [NSNumber
numberWithUnsignedInteger:i], @"index", nil]];
- if (aURL) {
- [copiedURLs addObject:aURL];
+ if (realURL) {
+ [copiedURLs addObject:realURL];
i++;
}
}
@@ -3032,7 +2977,7 @@
if (isMove) {
- didPerform = [[self dataSource] fileView:self
moveURLsAtIndexes:[[_selectionIndexes retain] autorelease] toIndex:insertIndex
forDrop:sender dropOperation:_fvFlags.dropOperation];
+ didPerform = [[self dataSource] fileView:self
moveURLsAtIndexes:_selectionIndexes toIndex:insertIndex forDrop:sender
dropOperation:_fvFlags.dropOperation];
} else if (FVDropBefore == _fvFlags.dropOperation || FVDropAfter ==
_fvFlags.dropOperation || NSNotFound == _dropIndex) {
@@ -3124,7 +3069,6 @@
- (void)animationDidStop:(NSAnimation *)animation
{
- [_arrowAnimation release];
_arrowAnimation = nil;
_arrowAlpha = _fvFlags.hasArrows ? 1.0 : 0.0;
[self setNeedsDisplayInRect:NSUnionRect(_leftArrowFrame,
_rightArrowFrame)];
@@ -3132,7 +3076,6 @@
- (void)animationDidEnd:(NSAnimation *)animation
{
- [_arrowAnimation release];
_arrowAnimation = nil;
_arrowAlpha = _fvFlags.hasArrows ? 1.0 : 0.0;
[self setNeedsDisplayInRect:NSUnionRect(_leftArrowFrame,
_rightArrowFrame)];
@@ -3398,7 +3341,6 @@
if (newSelection) {
[self _setSelectionIndexes:newSelection];
- [newSelection release];
}
// always reset this
@@ -3882,7 +3824,7 @@
- (IBAction)delete:(id)sender;
{
_fvFlags.needsReload = YES;
- if (NO == [self isEditable] || NO == [[self dataSource] fileView:self
deleteURLsAtIndexes:[[_selectionIndexes retain] autorelease]])
+ if (NO == [self isEditable] || NO == [[self dataSource] fileView:self
deleteURLsAtIndexes:_selectionIndexes])
NSBeep();
else if (_fvFlags.needsReload)
[self reloadIcons];
@@ -4017,7 +3959,7 @@
- (NSMenu *)menuForIconAtIndex:(NSUInteger)idx
{
- NSMenu *menu = [[[[self class] defaultMenu] copy] autorelease];
+ NSMenu *menu = [[[self class] defaultMenu] copy];
// Finder changes selection only if the clicked item isn't in the current
selection
if (menu && NO == [_selectionIndexes containsIndex:idx])
@@ -4108,7 +4050,6 @@
}
[image unlockFocus];
[anItem setImage:image];
- [image release];
}
}
@@ -4150,7 +4091,6 @@
else {
NSMenu *submenu = [[NSMenu alloc] initWithTitle:@""];
[anItem setSubmenu:submenu];
- [submenu release];
addFinderLabelsToSubmenu(submenu);
}
@@ -4282,7 +4222,6 @@
[_downloads addObject:download];
[download setDelegate:self];
[download start];
- [download release];
}
}
}
@@ -4311,7 +4250,7 @@
FVProgressIndicatorCell *progressIndicator = [_progressIndicators
objectForKey:aURL];
NSUInteger r, c;
if (progressIndicator == nil) {
- progressIndicator = [[[FVProgressIndicatorCell alloc] init]
autorelease];
+ progressIndicator = [[FVProgressIndicatorCell alloc] init];
[progressIndicator setIndexInView:anIndex];
if (_progressIndicators == nil)
_progressIndicators = [[NSMutableDictionary alloc] init];
@@ -4562,7 +4501,7 @@
NSUInteger i = [_orderedURLs indexOfObject:item];
if (i != NSNotFound) {
NSRect iconRect = NSMakeRect(0.0, 0.0, ceil(_iconSize.width),
ceil(_iconSize.height));
- image = [[[NSImage alloc] initWithSize:iconRect.size] autorelease];
+ image = [[NSImage alloc] initWithSize:iconRect.size];
[image lockFocus];
[[self iconAtIndex:i] drawInRect:iconRect
ofContext:[[NSGraphicsContext currentContext] graphicsPort]];
[image unlockFocus];
@@ -4680,7 +4619,7 @@
- (NSArray *)accessibilityAttributeNames {
static NSArray *attributes = nil;
if (attributes == nil)
- attributes = [[[super accessibilityAttributeNames]
arrayByAddingObjectsFromArray:[NSArray
arrayWithObjects:NSAccessibilityChildrenAttribute,
NSAccessibilityVisibleChildrenAttribute,
NSAccessibilitySelectedChildrenAttribute, NSAccessibilityRowCountAttribute,
NSAccessibilityColumnCountAttribute, NSAccessibilityOrientationAttribute,
NSAccessibilityOrderedByRowAttribute, nil]] retain];
+ attributes = [[super accessibilityAttributeNames]
arrayByAddingObjectsFromArray:[NSArray
arrayWithObjects:NSAccessibilityChildrenAttribute,
NSAccessibilityVisibleChildrenAttribute,
NSAccessibilitySelectedChildrenAttribute, NSAccessibilityRowCountAttribute,
NSAccessibilityColumnCountAttribute, NSAccessibilityOrientationAttribute,
NSAccessibilityOrderedByRowAttribute, nil]];
return attributes;
}
@@ -4790,7 +4729,6 @@
NSMutableIndexSet *indexes = [[self selectionIndexes] mutableCopy];
[indexes removeIndex:i];
[self _setSelectionIndexes:indexes];
- [indexes release];
}
}
@@ -4865,12 +4803,6 @@
return self;
}
-- (void)dealloc
-{
- [_name release];
- [super dealloc];
-}
-
@end
#pragma mark -
@@ -5019,7 +4951,6 @@
- (void)dealloc
{
NSZoneFree(NULL, _filePath);
- [super dealloc];
}
- (NSString *)description { return [NSString stringWithFormat:@"%@: %s",
[super description], _filePath]; }
@@ -5026,7 +4957,7 @@
- (id)copyWithZone:(NSZone *)aZone
{
- return [self retain];
+ return self;
}
- (BOOL)isEqual:(_FVControllerFileKey *)other
@@ -5075,7 +5006,7 @@
} else {
NSView *view = nil;
if ([[self subviews] count] == 0) {
- view = [[[NSClassFromString(@"NSVisualEffectView") alloc]
initWithFrame:[self bounds]] autorelease];
+ view = [[NSClassFromString(@"NSVisualEffectView") alloc]
initWithFrame:[self bounds]];
[view setAutoresizingMask:NSViewWidthSizable |
NSViewHeightSizable];
if (view)
[self addSubview:view];
@@ -5097,18 +5028,12 @@
return self;
}
-- (void)dealloc {
- [_backgroundColor release];
- [super dealloc];
-}
-
- (BOOL)isFlipped { return YES; }
- (void)setBackgroundColor:(NSColor *)backgroundColor
{
if (backgroundColor != _backgroundColor) {
- [_backgroundColor release];
- _backgroundColor = [backgroundColor retain];
+ _backgroundColor = backgroundColor;
[self _updateVisualEffectViewIfNeeded];
[self setNeedsDisplay:YES];
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -91,7 +91,7 @@
}
- (id)initWithURL:(NSURL *)aURL drawsLinkBadge:(BOOL)drawsLinkBadge {
- [self release];
+ self = nil;
if (aURL == nil)
return [FVFinderIcon newMissing];
else if ([aURL isFileURL] == NO)
@@ -129,7 +129,7 @@
}
+ (id)newMissing {
- return (id)[[FVFinderIcon sharedMissingFinderIcon] retain];
+ return (id)[FVFinderIcon sharedMissingFinderIcon];
}
+ (id)newWithURLScheme:(NSString *)scheme {
@@ -140,7 +140,7 @@
NSString *type =
NSFileTypeForHFSTypeCode(kInternetLocationHTTPIcon);
httpURLIcon = (id)[[FVSharedFinderIcon alloc] initWithType:type
badgeType:nil];
}
- return [httpURLIcon retain];
+ return httpURLIcon;
} else if ([scheme isEqualToString:@"ftp"]) {
static id ftpURLIcon = nil;
if (nil == ftpURLIcon) {
@@ -147,7 +147,7 @@
NSString *type =
NSFileTypeForHFSTypeCode(kInternetLocationFTPIcon);
ftpURLIcon = (id)[[FVSharedFinderIcon alloc] initWithType:type
badgeType:nil];
}
- return [ftpURLIcon retain];
+ return ftpURLIcon;
} else if ([scheme rangeOfString:@"mail"].length) {
static id mailURLIcon = nil;
if (nil == mailURLIcon) {
@@ -154,7 +154,7 @@
NSString *type =
NSFileTypeForHFSTypeCode(kInternetLocationMailIcon);
mailURLIcon = (id)[[FVSharedFinderIcon alloc] initWithType:type
badgeType:nil];
}
- return [mailURLIcon retain];
+ return mailURLIcon;
} else {
static id genericURLIcon = nil;
if (nil == genericURLIcon) {
@@ -161,7 +161,7 @@
NSString *type = NSFileTypeForHFSTypeCode(kGenericURLIcon);
genericURLIcon = (id)[[FVSharedFinderIcon alloc] initWithType:type
badgeType:nil];
}
- return [genericURLIcon retain];
+ return genericURLIcon;
}
}
@@ -185,9 +185,9 @@
}
if (isPlainFolder) {
- return [[FVFinderIcon sharedGenericFolderIcon] retain];
+ return [FVFinderIcon sharedGenericFolderIcon];
} else if (NO == drawsLinkBadge && [self _isSavedSearchURL:aURL]) {
- return [[FVFinderIcon sharedSavedSearchIcon] retain];
+ return [FVFinderIcon sharedSavedSearchIcon];
} else {
if (icon == nil)
[aURL getResourceValue:&icon forKey:NSURLEffectiveIconKey
error:NULL];
@@ -213,16 +213,11 @@
self = [self init];
if (self) {
_drawsLinkBadge = drawsLinkBadge;
- _icon = [icon retain];
+ _icon = icon;
}
return self;
}
-- (void)dealloc
-{
- [_icon release];
- [super dealloc];
-}
- (void)drawInRect:(NSRect)dstRect ofContext:(CGContextRef)context;
{
@@ -300,7 +295,6 @@
- (void)dealloc
{
FVAPIAssert1(0, @"attempt to deallocate %@", self);
- [super dealloc];
}
- (void)drawInRect:(NSRect)dstRect ofContext:(CGContextRef)context;
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m 2024-01-20 16:03:45 UTC
(rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m 2024-01-21 17:00:31 UTC
(rev 28635)
@@ -128,7 +128,7 @@
+ (id)iconWithURL:(NSURL *)representedURL;
{
- return [[[self alloc] initWithURL:representedURL] autorelease];
+ return [[self alloc] initWithURL:representedURL];
}
// subclass responsibility, in particular FVPlaceholderIcon
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIconOperation.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIconOperation.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIconOperation.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -51,8 +51,8 @@
NSParameterAssert(nil == view || [view
respondsToSelector:@selector(iconUpdated:)]);
self = [super init];
if (self) {
- _view = [view retain];
- _icon = [icon retain];
+ _view = view;
+ _icon = icon;
}
return self;
}
@@ -68,15 +68,11 @@
- (void)dealloc
{
- [_icon release];
// release is thread safe, but we don't want to trigger dealloc on this
thread
- NS_VALID_UNTIL_END_OF_SCOPE __block id view = [_view retain];
+ NS_VALID_UNTIL_END_OF_SCOPE __block id view = _view;
dispatch_async(dispatch_get_main_queue(), ^{
- [view release];
view = nil;
});
- [_view release];
- [super dealloc];
}
@end
@@ -137,7 +133,6 @@
[_icon renderForSize:_desiredSize];
FVIconUpdateOperation *op = [[FVIconUpdateOperation alloc]
initWithIcon:_icon view:_view];
[[FVOperationQueue mainQueue] addOperation:op];
- [op release];
[self finished];
}
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -90,7 +90,6 @@
if (superClass == FVIconClass) {
_FVQueuedKeys *qkeys = [_FVQueuedKeys new];
CFDictionaryAddValue(queuedKeysByClass, (__bridge void
*)aClass, (__bridge void *)qkeys);
- [qkeys release];
break;
}
superClass = class_getSuperclass(superClass);
@@ -264,8 +263,6 @@
{
pthread_mutex_destroy(&_keyLock);
pthread_cond_destroy(&_keyCondition);
- [_keys release];
- [super dealloc];
}
- (void)startRenderingForKey:(id)aKey
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -68,7 +68,6 @@
if (self) {
buffer = NSZoneMalloc(NULL, sizeof(vImage_Buffer));
if (NULL == buffer) {
- [self release];
self = nil;
}
else {
@@ -79,7 +78,6 @@
buffer->data = CFAllocatorAllocate([self allocator], bufferSize,
0);
FVAtomicAdd64(_allocatedBytes, _bufferSize);
if (NULL == buffer->data) {
- [self release];
self = nil;
} else {
_freeBufferOnDealloc = YES;
@@ -121,7 +119,6 @@
if (_freeBufferOnDealloc) CFAllocatorDeallocate([self allocator],
buffer->data);
FVAtomicSub64(_allocatedBytes, _bufferSize);
if (buffer != NULL) NSZoneFree(NULL, buffer);
- [super dealloc];
}
- (void)setFreeBufferOnDealloc:(BOOL)flag;
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -61,7 +61,7 @@
static NSArray *types = nil;
if (types == nil) {
- types = [(NSArray
*)CFBridgingRelease(CGImageSourceCopyTypeIdentifiers()) retain];
+ types = (NSArray
*)CFBridgingRelease(CGImageSourceCopyTypeIdentifiers());
}
return [types containsObject:type];
@@ -87,8 +87,6 @@
{
CGImageRelease(_thumbnail);
CGImageRelease(_fullImage);
- [_fallbackIcon release];
- [super dealloc];
}
- (BOOL)canReleaseResources;
@@ -138,7 +136,6 @@
if (imageData) {
CGImageSourceRef src = CGImageSourceCreateWithData((__bridge
CFDataRef)imageData, _imsrcOptions);
- [imageData release];
if (src) {
if (CGImageSourceGetCount(src) > 0)
image = CGImageSourceCreateImageAtIndex(src, 0, _imsrcOptions);
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.h
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.h
2024-01-21 17:00:31 UTC (rev 28635)
@@ -69,7 +69,7 @@
@warning This has only undergone limited testing, but is known to work for
object and NSRect types. Test it yourself for others.
@return The return value of the invocation. If this is not an object, it
will be wrapped in an NSValue. */
-@property (nonatomic, readonly) id result;
+@property (nonatomic, unsafe_unretained, readonly) id result;
/** @brief Wrapper for result
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -49,7 +49,7 @@
NSParameterAssert(nil != inv);
self = [super init];
if (self) {
- _invocation = [inv retain];
+ _invocation = inv;
// NSOperation is documented to do this
[_invocation retainArguments];
@@ -86,9 +86,6 @@
- (void)dealloc
{
if (_retdata) NSZoneFree(NULL, _retdata);
- [_invocation release];
- [_exception release];
- [super dealloc];
}
- (BOOL)isEqual:(FVInvocationOperation *)other
@@ -105,7 +102,7 @@
[_invocation invoke];
}
@catch (id exception) {
- _exception = [exception retain];
+ _exception = exception;
}
}
[self finished];
@@ -159,7 +156,7 @@
- (id)result
{
- return [[self copyResult] autorelease];
+ return [self copyResult];
}
@end
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -47,7 +47,7 @@
{
FVINITIALIZE(FVMIMEIcon);
- _networkIcon = [[[NSWorkspace sharedWorkspace]
iconForFileType:NSFileTypeForHFSTypeCode(kGenericNetworkIcon)] retain];
+ _networkIcon = [[NSWorkspace sharedWorkspace]
iconForFileType:NSFileTypeForHFSTypeCode(kGenericNetworkIcon)];
_iconTable = [NSMutableDictionary new];
}
@@ -55,7 +55,7 @@
{
NSAssert2(pthread_main_np() != 0, @"*** threading violation *** +[%@ %@]
requires main thread", self, NSStringFromSelector(_cmd));
NSParameterAssert(nil != type);
- FVMIMEIcon *icon = [[_iconTable objectForKey:type] retain];
+ FVMIMEIcon *icon = [_iconTable objectForKey:type];
if (nil == icon) {
icon = [[[self class] alloc] initWithType:type];
if (icon)
@@ -68,7 +68,7 @@
{
NSAssert2(pthread_main_np() != 0, @"*** threading violation *** +[%@ %@]
requires main thread", self, NSStringFromSelector(_cmd));
if (self = [super init]) {
- _icon = [[[NSWorkspace sharedWorkspace] iconForFileType:type] retain];
+ _icon = [[NSWorkspace sharedWorkspace] iconForFileType:type];
}
return self;
}
@@ -76,7 +76,6 @@
- (void)dealloc
{
FVAPIAssert1(0, @"attempt to deallocate %@", self);
- [super dealloc];
}
- (void)renderForSize:(NSSize)size { /* no-op */ }
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -87,9 +87,6 @@
NSParameterAssert(FALSE == CFRunLoopContainsObserver(CFRunLoopGetMain(),
_observer, kCFRunLoopCommonModes));
CFRelease(_observer);
_observer = NULL;
- [_pendingOperations release];
- [_activeOperations release];
- [super dealloc];
}
- (void)handleAppTerminate:(NSNotification *)aNote
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMovieIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMovieIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMovieIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -103,8 +103,6 @@
// 4% or 10 seconds, whichever is smaller
time.value = MIN(time.value / 25, 10 * (CMTimeValue)time.timescale);
CGImageRef image = [imageGenerator copyCGImageAtTime:time actualTime:NULL
error:NULL];
- [imageGenerator release];
- [asset release];
*isFullSize = NO;
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -74,8 +74,6 @@
- (void)dealloc
{
NSZoneFree(NULL, (void *)_flags);
- [_queue release];
- [super dealloc];
}
- (NSUInteger)hash
@@ -124,7 +122,7 @@
- (void)setQueue:(id)queue {
FVAPIAssert(nil == _queue, @"setQueue: may only be called once");
- _queue = [queue retain];
+ _queue = queue;
}
- (BOOL)isConcurrent {
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -103,7 +103,6 @@
if ([oldObjects count])
[oldObjects
makeObjectsPerformSelector:@selector(_releaseMappedResources)];
- [oldObjects release];
}
+ (void)_removeIconForMappedRelease:(FVPDFIcon *)anIcon;
@@ -152,7 +151,6 @@
if (_pdfDoc && _isMapped) [_FVMappedDataProvider
releaseProviderForURL:_fileURL];
CGImageRelease(_thumbnail);
CGPDFDocumentRelease(_pdfDoc);
- [super dealloc];
}
- (BOOL)canReleaseResources;
@@ -561,7 +559,6 @@
- (void)_setFileURL:(NSURL *)aURL
{
- [_fileURL autorelease];
_fileURL = [aURL copy];
}
@@ -603,9 +600,7 @@
aURL = __FVCreatePDFURLForPDFBundleURL([self _fileURL]);
if (aURL) {
[self _setFileURL:aURL];
- [aURL release];
} else {
- [self release];
self = nil;
}
}
@@ -631,7 +626,6 @@
if (aURL) {
[self _setFileURL:aURL];
} else {
- [self release];
self = nil;
}
}
@@ -663,7 +657,6 @@
for (NSURL *aURL in [_convertedKeys allValues])
unlink([[aURL path] fileSystemRepresentation]);
- [_convertedKeys release];
_convertedKeys = nil;
[_convertedKeysLock unlock];
}
@@ -686,11 +679,10 @@
+ (NSURL *)_temporaryPDFURL
{
CFUUIDRef uuid = CFUUIDCreate(CFAllocatorGetDefault());
- NSString *uniqueString = (NSString
*)CFUUIDCreateString(CFGetAllocator(uuid), uuid);
+ NSString *uniqueString = (NSString
*)CFBridgingRelease(CFUUIDCreateString(CFGetAllocator(uuid), uuid));
CFRelease(uuid);
NSString *newPath = [[NSTemporaryDirectory()
stringByAppendingPathComponent:uniqueString]
stringByAppendingPathExtension:@"pdf"];
NSURL *newURL = [NSURL fileURLWithPath:newPath];
- [uniqueString release];
return newURL;
}
@@ -701,7 +693,7 @@
[_convertedKeysLock lock];
// key is based on /original/ file URL
- id key = [[FVCGImageCache newKeyForURL:[self _fileURL]] autorelease];
+ id key = [FVCGImageCache newKeyForURL:[self _fileURL]];
NSURL *newURL = [_convertedKeys objectForKey:key];
if (nil != newURL) {
@@ -788,7 +780,6 @@
- (void)dealloc
{
FVAPIAssert1(0, @"attempt to deallocate %@", self);
- [super dealloc];
}
- (void)renderForSize:(NSSize)size { /* no-op */ }
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPlaceholderImage.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPlaceholderImage.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPlaceholderImage.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -102,7 +102,7 @@
NSUInteger i, iMax = sizeof(_sizes) / sizeof(NSUInteger);
for (i = 0; i < iMax; i++)
if (_sizes[i] >= height) break;
- return (CGLayerRef)[_placeholders objectAtIndex:MIN(i, count - 1)];
+ return (__bridge CGLayerRef)[_placeholders objectAtIndex:MIN(i, count -
1)];
}
@end
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -94,7 +94,7 @@
return NO;
if (nil == theUTI || UTTypeEqual((__bridge CFStringRef)theUTI,
kUTTypeData)) {
- NSAttributedString *string = [[[NSAttributedString alloc]
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL] autorelease];
+ NSAttributedString *string = [[NSAttributedString alloc]
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL];
return (string == nil);
}
else if (UTTypeConformsTo((__bridge CFStringRef)theUTI, kUTTypePDF) ||
UTTypeConformsTo((__bridge CFStringRef)theUTI, FVSTR("com.adobe.postscript"))) {
@@ -101,7 +101,7 @@
return NO;
}
else if ([FVTextIcon canInitWithURL:aURL withType:theUTI]) {
- NSAttributedString *string = [[[NSAttributedString alloc]
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL] autorelease];
+ NSAttributedString *string = [[NSAttributedString alloc]
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL];
return (string == nil);
}
@@ -198,7 +198,6 @@
NSImage *image = [[NSImage alloc] initWithSize:[imageRep size]];
[image addRepresentation:imageRep];
[animationView setImage:image];
- [image release];
[contentView selectLastTabViewItem:nil];
closeAfterAnimation = YES;
@@ -216,7 +215,6 @@
[animation setViewAnimations:[NSArray arrayWithObject:windowDict]];
[animation setDelegate:self];
[animation startAnimation];
- [animation release];
return YES;
}
@@ -226,14 +224,14 @@
[qlTask terminate];
// wait until the task actually exits, or we can end up launching a new
task before this one quits (happened when duplicate KVO notifications were sent)
[qlTask waitUntilExit];
- [qlTask release];
- qlTask = nil;
+ qlTask = nil;
}
- (void)setCurrentURL:(NSURL *)aURL
{
- [currentURL autorelease];
- currentURL = [aURL copy];
+ if (aURL != currentURL) {
+ currentURL = [aURL copy];
+ }
}
- (void)stopPreviewing;
@@ -267,7 +265,6 @@
CGPSConverterRef converter = CGPSConverterCreate(NULL,
&converterCallbacks, NULL);
CGDataProviderRef provider =
CGDataProviderCreateWithCFData((CFDataRef)psData);
- [psData release];
CFMutableDataRef pdfData =
CFDataCreateMutable(CFGetAllocator((CFDataRef)psData), 0);
CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData(pdfData);
@@ -351,19 +348,16 @@
[self _loadAttributedString:string documentAttributes:attrs
inView:[textView documentView]];
else
theView = nil;
- [string release];
}
else if (UTTypeConformsTo((__bridge CFStringRef)theUTI, kUTTypePDF)) {
theView = pdfView;
PDFDocument *pdfDoc = [[PDFDocument alloc] initWithURL:representedURL];
[pdfView setDocument:pdfDoc];
- [pdfDoc release];
}
else if (UTTypeConformsTo((__bridge CFStringRef)theUTI,
FVSTR("com.adobe.postscript"))) {
theView = pdfView;
PDFDocument *pdfDoc = [[PDFDocument alloc]
initWithData:PDFDataWithPostScriptDataAtURL(representedURL)];
[pdfView setDocument:pdfDoc];
- [pdfDoc release];
}
else if (UTTypeConformsTo((__bridge CFStringRef)theUTI, kUTTypeImage)) {
theView = imageView;
@@ -376,7 +370,6 @@
if (nil != movie) {
theView = movieView;
[movieView setMovie:movie];
- [movie release];
}
}
*/
@@ -388,7 +381,6 @@
[self _loadAttributedString:string documentAttributes:attrs
inView:[textView documentView]];
else
theView = nil;
- [string release];
}
// probably just a Finder icon, but NSWorkspace returns a crappy little
icon (so use Quick Look if possible)
@@ -558,7 +550,6 @@
NSImage *image = [[NSImage alloc] initWithSize:[imageRep size]];
[image addRepresentation:imageRep];
[animationView setImage:image];
- [image release];
[contentView selectLastTabViewItem:nil];
@@ -580,7 +571,6 @@
[animation setDelegate:self];
closeAfterAnimation = NO;
[animation startAnimation];
- [animation release];
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.h 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.h 2024-01-21
17:00:31 UTC (rev 28635)
@@ -87,7 +87,7 @@
/** Enumeration.
Objects are returned in descending priority (high priority objects returned
first).
@return An autoreleased enumerator. */
-@property (nonatomic, readonly) NSEnumerator *objectEnumerator;
+@property (nonatomic, weak, readonly) NSEnumerator *objectEnumerator;
/** Operation on the collection.
The \a selector is invoked on each object in the queue in order of descending
priority (high priority first).
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm
2024-01-21 17:00:31 UTC (rev 28635)
@@ -140,7 +140,6 @@
_mutations = 0;
if (NULL == _values || NULL == _set) {
- [self release];
self = nil;
}
@@ -154,7 +153,6 @@
{
if (_set) CFRelease(_set);
NSZoneFree(NULL, _values);
- [super dealloc];
}
- (void)push:(id)object;
@@ -254,8 +252,8 @@
__FVPriorityQueueSetCount(self, count);
toReturn = *(__FVPriorityQueueHeapEnd(self));
- // make sure we don't remove the last reference to this object
- toReturn = [[toReturn retain] autorelease];
+ // make sure we don't remove the last reference to this object?
+ toReturn = toReturn;
CFSetRemoveValue(_set, (__bridge void *)toReturn);
if (0 == count)
@@ -277,7 +275,7 @@
- (NSEnumerator *)objectEnumerator
{
- return [[[FVPriorityQueueEnumerator alloc] initWithQueue:self]
autorelease];
+ return [[FVPriorityQueueEnumerator alloc] initWithQueue:self];
}
- (void)_sortQueueForEnumeration
@@ -294,10 +292,11 @@
- (void)makeObjectsPerformSelector:(SEL)selector
{
- NSUInteger i, count = __FVPriorityQueueCount(self);
- [self _sortQueueForEnumeration];
+ NSUInteger i, count = __FVPriorityQueueCount(self);
+ if (NO == _sorted)
+ [self _sortQueueForEnumeration];
for (i = 0; i < count; i++)
- [_values[i] performSelector:selector];
+ ((void (*)(id, SEL))[_values[i]
methodForSelector:selector])(_values[i], selector);
}
- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
objects:(id __unsafe_unretained *)stackbuf count:(NSUInteger)len;
@@ -345,7 +344,7 @@
self = [super init];
if (self) {
_currentIndex = 0;
- _queue = [queue retain];
+ _queue = queue;
_count = [queue count];
[_queue _sortQueueForEnumeration];
}
@@ -352,11 +351,6 @@
return self;
}
-- (void)dealloc
-{
- [_queue release];
- [super dealloc];
-}
- (id)nextObject
{
@@ -364,8 +358,6 @@
if (_currentIndex < _count) {
obj = *(__FVPriorityQueueHeapStart(_queue) + _currentIndex);
_currentIndex++;
- if (_count == _currentIndex)
- obj = [[obj retain] autorelease];
}
return obj;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQuickLookIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQuickLookIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQuickLookIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -85,7 +85,6 @@
- (id)initWithURL:(NSURL *)aURL drawsLinkBadge:(BOOL)drawsLinkBadge
{
if (FVQLIconDisabled) {
- [self release];
self = nil;
}
else if ((self = [super initWithURL:aURL drawsLinkBadge:drawsLinkBadge])) {
@@ -110,8 +109,6 @@
CGImageRelease(_fullImage);
CGImageRelease(_thumbnail);
CGColorRelease(_backgroundColor);
- [_fallbackIcon release];
- [super dealloc];
}
- (BOOL)canReleaseResources;
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVScaledImageView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVScaledImageView.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVScaledImageView.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -62,7 +62,6 @@
[ps setAlignment:NSCenterTextAlignment];
#endif
[ta setObject:ps forKey:NSParagraphStyleAttributeName];
- [ps release];
NSMutableAttributedString *fileDescription = [[NSMutableAttributedString
alloc] initWithString:[[NSFileManager defaultManager]
displayNameAtPath:[_fileURL path]]];
[fileDescription addAttributes:ta range:NSMakeRange(0, [fileDescription
length])];
@@ -71,7 +70,7 @@
MDItemRef mdItem = MDItemCreate(NULL, (CFStringRef)[_fileURL path]);
NSDictionary *mdAttributes = nil;
if (NULL != mdItem) {
- mdAttributes = [(id)MDItemCopyAttributeList(mdItem, kMDItemKind,
kMDItemPixelHeight, kMDItemPixelWidth) autorelease];
+ mdAttributes = (id)CFBridgingRelease(MDItemCopyAttributeList(mdItem,
kMDItemKind, kMDItemPixelHeight, kMDItemPixelWidth));
CFRelease(mdItem);
}
@@ -82,11 +81,10 @@
if ([mdAttributes objectForKey:(id)kMDItemPixelHeight] &&
[mdAttributes objectForKey:(id)kMDItemPixelWidth])
[[kindString mutableString]
appendFormat:NSLocalizedStringFromTableInBundle(@"\n%@ by %@ pixels",
@"FileView", bundle, @"two string format specifiers"), [mdAttributes
objectForKey:(id)kMDItemPixelWidth], [mdAttributes
objectForKey:(id)kMDItemPixelHeight]];
[fileDescription appendAttributedString:kindString];
- [kindString release];
}
NSDictionary *fattrs = [[NSFileManager defaultManager]
attributesOfItemAtPath:[_fileURL path] error:NULL];
if (fattrs) {
- NSDateFormatter *formatter = [[[NSDateFormatter alloc] init]
autorelease];
+ NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setFormatterBehavior:NSDateFormatterBehavior10_4];
[formatter setDateStyle:NSDateFormatterLongStyle];
[formatter setTimeStyle:NSDateFormatterMediumStyle];
@@ -105,28 +103,17 @@
NSMutableAttributedString *details = [[NSMutableAttributedString
alloc] initWithString:[NSString
stringWithFormat:NSLocalizedStringFromTableInBundle(@"\n\nSize: %.1f
%@\nCreated: %@\nModified: %@", @"FileView", bundle, @"message displayed in
preview"), mbsize, label, [formatter stringFromDate:[fattrs
objectForKey:NSFileCreationDate]], [formatter stringFromDate:[fattrs
objectForKey:NSFileModificationDate]]] attributes:ta];
[details addAttribute:NSFontAttributeName value:[NSFont
systemFontOfSize:[NSFont smallSystemFontSize]] range:NSMakeRange(0, [details
length])];
[fileDescription appendAttributedString:details];
- [details release];
}
- [_text release];
_text = fileDescription;
}
-- (void)dealloc
-{
- [_icon release];
- [_text release];
- [super dealloc];
-}
-
- (void)setIcon:(FVIcon *)anIcon
{
- [_icon autorelease];
- _icon = [anIcon retain];
+ _icon = anIcon;
}
- (void)setFileURL:(NSURL *)aURL
{
- [_fileURL autorelease];
_fileURL = [aURL copy];
}
@@ -141,7 +128,6 @@
{
[self setFileURL:aURL];
[self setIcon:[FVIcon iconWithURL:aURL]];
- [_text release];
_text = nil;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVSlider.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVSlider.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVSlider.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -75,7 +75,7 @@
[outerPath stroke];
// draw a dark background
- NSGradient *gradient = [[[NSGradient alloc]
initWithStartingColor:[NSColor colorWithCalibratedWhite:0.4 alpha:0.6]
endingColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.6]] autorelease];
+ NSGradient *gradient = [[NSGradient alloc]
initWithStartingColor:[NSColor colorWithCalibratedWhite:0.4 alpha:0.6]
endingColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.6]];
[gradient drawInBezierPath:outerPath angle:angle];
// draw the track
@@ -83,7 +83,7 @@
radius = NSHeight(track) / 2;
NSBezierPath *innerPath = [NSBezierPath
bezierPathWithRoundedRect:track xRadius:radius yRadius:radius];
[innerPath addClip];
- gradient = [[[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedWhite:0.0 alpha:0.3] endingColor:[NSColor
colorWithCalibratedWhite:0.3 alpha:0.3]] autorelease];
+ gradient = [[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedWhite:0.0 alpha:0.3] endingColor:[NSColor
colorWithCalibratedWhite:0.3 alpha:0.3]];
[gradient drawInBezierPath:innerPath angle:angle];
// draw a dark outline for the track
@@ -167,8 +167,6 @@
[[self contentView] addSubview:_slider];
NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect:[_slider
bounds] options:NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect |
NSTrackingActiveAlways owner:self userInfo:nil];
[_slider addTrackingArea:area];
- [area release];
- [_slider release];
}
return self;
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -55,7 +55,6 @@
// This is mainly useful to prove that the file cannot be opened; as
in the case of OmniGraffle files (see comment above), it returns YES.
NSAttributedString *attributedString = [[NSAttributedString alloc]
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL];
BOOL canInit = (nil != attributedString);
- [attributedString release];
return canInit;
}
@@ -107,7 +106,6 @@
if (text) {
attrString = [[NSMutableAttributedString alloc]
initWithString:text];
- [text release];
}
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVThread.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVThread.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVThread.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -130,7 +130,7 @@
pthread_mutex_lock(&_lock);
_FVThread *thread = nil;
if ([_threadPool count]) {
- thread = [[_threadPool lastObject] retain];
+ thread = [_threadPool lastObject];
[_threadPool removeLastObject];
}
pthread_mutex_unlock(&_lock);
@@ -138,7 +138,7 @@
thread = [_FVThread new];
FVAtomicInc(_threadCount);
}
- return [thread autorelease];
+ return thread;
}
// no ownership transfer here
@@ -208,6 +208,7 @@
// not required as an ivar at present
pthread_t thread;
if (0 == err) {
+ // the CFRetain is balanced by a CFRelease at the end of
__FVThread_main
CFTypeRef retainedSelf = CFBridgingRetain(self);
err = pthread_create(&thread, &attr, __FVThread_main, (void
*)retainedSelf);
if (0 != err)
@@ -216,7 +217,6 @@
pthread_attr_destroy(&attr);
if (0 != err) {
- [self release];
self = nil;
}
// return immediately; performSelector:withObject:argument: will block
if necessary until the thread is running
@@ -232,9 +232,6 @@
#endif
pthread_cond_destroy(&_condition);
pthread_mutex_destroy(&_mutex);
- [_target release];
- [_argument release];
- [super dealloc];
}
- (NSString *)debugDescription
@@ -313,16 +310,14 @@
// this is certainly a developer error
FVAPIParameterAssert(NULL != self->_selector);
if (self->_argument)
- [self->_target performSelector:self->_selector
withObject:self->_argument];
+ ((void (*)(id, SEL, id))[self->_target
methodForSelector:self->_selector])(self->_target, self->_selector,
self->_argument);
else
- [self->_target performSelector:self->_selector];
+ ((void (*)(id, SEL))[self->_target
methodForSelector:self->_selector])(self->_target, self->_selector);
__FVBitClear(self->_flags, FVThreadWake);
__FVBitSet(self->_flags, FVThreadWaiting);
// reset all ivars
- [self->_target release];
self->_target = nil;
- [self->_argument release];
self->_argument = nil;
self->_selector = NULL;
@@ -342,15 +337,13 @@
- (void)setTarget:(id)value {
if (_target != value) {
- [_target release];
- _target = [value retain];
+ _target = value;
}
}
- (void)setArgument:(id)value {
if (_argument != value) {
- [_argument release];
- _argument = [value retain];
+ _argument = value;
}
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -58,13 +58,14 @@
static CFStringRef __FVTimerInfoCopyDescription(const void *info)
{
_FVNSObjectTimerInfo *tmi = (__bridge id)info;
- return (CFStringRef)[[NSString alloc]
initWithFormat:@"_FVNSObjectTimerInfo = {\n\ttarget = %@,\n\tselector = %@\n}",
tmi->target, NSStringFromSelector(tmi->selector)];
+ return (CFStringRef)CFBridgingRetain([[NSString alloc]
initWithFormat:@"_FVNSObjectTimerInfo = {\n\ttarget = %@,\n\tselector = %@\n}",
tmi->target, NSStringFromSelector(tmi->selector)]);
}
static void __FVRunLoopTimerFired(CFRunLoopTimerRef timer, void *info)
{
_FVNSObjectTimerInfo *tmi = (__bridge id)info;
- [tmi->target performSelector:tmi->selector withObject:(__bridge id)timer];
+ if (tmi->target && tmi->selector)
+ ((void (*)(id, SEL, CFRunLoopTimerRef))[tmi->target
methodForSelector:tmi->selector])(tmi->target, tmi->selector, timer);
}
CFRunLoopTimerRef FVCreateWeakTimerWithTimeInterval(NSTimeInterval interval,
NSTimeInterval fireTime, id target, SEL selector)
@@ -77,8 +78,6 @@
CFRunLoopTimerContext timerContext = { 0, (__bridge void *)tmi,
__FVTimerInfoRetain, __FVTimerInfoRelease, __FVTimerInfoCopyDescription };
CFRunLoopTimerRef timer = CFRunLoopTimerCreate(CFAllocatorGetDefault(),
fireTime, interval, 0, 0, __FVRunLoopTimerFired, &timerContext);
- // now owned by the timer
- [tmi release];
return timer;
}
@@ -101,7 +100,6 @@
} else {
fprintf(stderr, "unable to allocate log buffer\n");
}
- [logString release];
fprintf(stderr, "%s\n", buf);
@@ -127,7 +125,6 @@
[item setString:string forType:(NSString *)([url isFileURL] ?
kUTTypeFileURL : kUTTypeURL)];
[item setString:string forType:NSPasteboardTypeString];
[items addObject:item];
- [item release];
}
[pboard clearContents];
return [pboard writeObjects:items];
@@ -173,7 +170,6 @@
#else
NSWindow *window = [[NSWindow alloc] initWithContentRect:rect
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
#endif
- [window autorelease];
return [NSGraphicsContext graphicsContextWithWindow:window];
}
@@ -193,7 +189,7 @@
CFTypeRef volumeID = NULL;
if (rv == false && CFURLCopyResourcePropertyForKey((__bridge
CFURLRef)fileURL, kCFURLVolumeIdentifierKey, &volumeID, NULL) && volumeID) {
CFTypeRef otherVolumeID = NULL;
- if (CFURLCopyResourcePropertyForKey((CFURLRef)[NSURL
fileURLWithPath:NSOpenStepRootDirectory()], kCFURLVolumeIdentifierKey,
&otherVolumeID, NULL) && otherVolumeID) {
+ if (CFURLCopyResourcePropertyForKey((__bridge CFURLRef)[NSURL
fileURLWithPath:NSOpenStepRootDirectory()], kCFURLVolumeIdentifierKey,
&otherVolumeID, NULL) && otherVolumeID) {
rv = CFEqual(volumeID, otherVolumeID);
CFRelease(otherVolumeID);
}
@@ -301,7 +297,7 @@
#pragma clang diagnostic ignored "-Wpartial-availability"
NSAppearance *appearance = nil;
if ([object respondsToSelector:@selector(effectiveAppearance)]) {
- appearance = [[[NSAppearance currentAppearance] retain]
autorelease];
+ appearance = [NSAppearance currentAppearance];
[NSAppearance
setCurrentAppearance:[(id<NSAppearanceCustomization>)object
effectiveAppearance]];
}
code();
@@ -316,7 +312,6 @@
#if defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MIN_REQUIRED >=
MAC_OS_X_VERSION_10_9
(void)CFAutorelease(CFBridgingRetain(object));
#else
- CFTypeRef (*autoreleaseImp)(CFTypeRef, SEL) = (CFTypeRef (*)(CFTypeRef,
SEL))[object methodForSelector:@selector(autorelease)];
- (void)autoreleaseImp(CFBridgingRetain(object), @selector(autorelease));
+ (void)((CFTypeRef (*)(CFTypeRef, SEL))[object
methodForSelector:@selector(autorelease)])(CFBridgingRetain(object),
@selector(autorelease));
#endif
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -123,7 +123,6 @@
// if not supported, return a finder icon instead
// this should be handled by the placeholder class
if (0 == _maxWebViews || (NO == [[self class] _isSupportedScheme:[aURL
scheme]] && NO == [aURL isFileURL])) {
- [self release];
self = (id)[FVFinderIcon newWithURLScheme:[aURL scheme]];
}
else if ((self = [super init])) {
@@ -179,7 +178,6 @@
NSArray *icons = [_waitingList copy];
[_waitingList removeAllObjects];
[icons makeObjectsPerformSelector:@selector(_startWebView)];
- [icons release];
}
}
}
@@ -194,14 +192,8 @@
// make sure to deregister for notification
[self _releaseWebView];
}
- [_webLoader release];
- [_condLock release];
CGImageRelease(_fullImage);
CGImageRelease(_thumbnail);
- [_httpURL release];
- [_fallbackIcon release];
- [_cacheKey release];
- [super dealloc];
}
- (BOOL)canReleaseResources;
@@ -223,7 +215,6 @@
[self performSelectorOnMainThread:@selector(_releaseWebView)
withObject:nil waitUntilDone:YES modes:[NSArray
arrayWithObject:(id)kCFRunLoopCommonModes]];
// need to avoid creating the fallback icon in this case, so we know
to retry later
- [_webLoader release];
_webLoader = nil;
[_condLock unlockWithCondition:LOADED];
}
@@ -251,7 +242,6 @@
// this is a sentinel value for needsRenderForSize:
[self lock];
- [_fallbackIcon release];
_fallbackIcon = nil;
_loadFailed = NO;
[self unlock];
@@ -290,7 +280,6 @@
// condition should always be LOADING, but -releaseResources may have the
lock
if ([_condLock tryLockWhenCondition:LOADING]) {
_loadFailed = YES;
- [_fallbackIcon release];
_fallbackIcon = [FVMIMEIcon newIconWithType:type ?: @""];
[self unlock];
}
@@ -405,7 +394,6 @@
}
// get rid of the loader
- [_webLoader release];
_webLoader = nil;
}
// don't allocate anything for a load that was cancelled
(releaseResources called during load)
@@ -539,9 +527,6 @@
- (void)dealloc
{
CGImageRelease(_viewImage);
- [_redirectedFrames release];
- [_webView release];
- [super dealloc];
}
- (void)_loadURL:(NSURL *)httpURL forIcon:(FVWebViewIcon *)icon
@@ -620,7 +605,6 @@
FVAPIAssert([_webView UIDelegate] == nil, @"UIDelegate non-nil");
// autorelease instead of release to workaround rdar://problem/9923439
(WebKit: crash when loading cancelled due to policy delegate callout)
FVRetainAutorelease(_webView);
- [_webView release];
_webView = nil;
return YES;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView
Program/Controller.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView Program/Controller.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView Program/Controller.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -62,7 +62,7 @@
- (void)selectAndSort
{
[arrayController setSelectionIndex:5];
- NSSortDescriptor *sort = [[[NSSortDescriptor alloc] initWithKey:@"path"
ascending:YES] autorelease];
+ NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"path"
ascending:YES];
[arrayController setSortDescriptors:[NSArray arrayWithObject:sort]];
}
@@ -104,12 +104,6 @@
[_fileView setAllowsDownloading:YES];
}
-- (void)dealloc
-{
- [_filePaths release];
- [super dealloc];
-}
-
- (NSUInteger)numberOfURLsInFileView:(FVFileView *)aFileView { return 0; }
- (NSURL *)fileView:(FVFileView *)aFileView URLAtIndex:(NSUInteger)idx {
return nil; }
@@ -146,7 +140,6 @@
[arrayController removeObjectsAtArrangedObjectIndexes:aSet];
aSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(anIndex, [aSet
count])];
[arrayController insertObjects:toMove atArrangedObjectIndexes:aSet];
- [toMove release];
return YES;
}
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView Program/FileView
Program-Info.plist
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView Program/FileView
Program-Info.plist 2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView Program/FileView
Program-Info.plist 2024-01-21 17:00:31 UTC (rev 28635)
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>com.mac.amaxwell.fileviewprogram</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Modified:
trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.xcodeproj/project.pbxproj
===================================================================
---
trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.xcodeproj/project.pbxproj
2024-01-20 16:03:45 UTC (rev 28634)
+++
trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.xcodeproj/project.pbxproj
2024-01-21 17:00:31 UTC (rev 28635)
@@ -914,6 +914,7 @@
"-framework",
AppKit,
);
+ PRODUCT_BUNDLE_IDENTIFIER =
com.mac.amaxwell.fileviewprogram;
PRODUCT_NAME = "FileView Program";
WRAPPER_EXTENSION = app;
};
@@ -932,6 +933,7 @@
"-framework",
AppKit,
);
+ PRODUCT_BUNDLE_IDENTIFIER =
com.mac.amaxwell.fileviewprogram;
PRODUCT_NAME = "FileView Program";
WRAPPER_EXTENSION = app;
};
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -129,7 +129,6 @@
}
close(fd);
CFDictionarySetValue(_dataProviders, (__bridge CFURLRef)aURL,
(__bridge void *)pInfo);
- [pInfo release];
}
if (pInfo) pInfo->_refCount++;
pthread_mutex_unlock(&_providerLock);
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVPreviewerWindow.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVPreviewerWindow.m
2024-01-20 16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVPreviewerWindow.m
2024-01-21 17:00:31 UTC (rev 28635)
@@ -87,7 +87,7 @@
_lastClickTime = 0;
_clickCount = 0;
- _mouseDownTap = CGEventTapCreateForPSN(&psn, kCGHeadInsertEventTap,
kCGEventTapOptionListenOnly,
kCGEventLeftMouseDown|kCGEventRightMouseDown|kCGEventOtherMouseDown,
__FVPreviewWindowMouseDown, self);
+ _mouseDownTap = CGEventTapCreateForPSN(&psn, kCGHeadInsertEventTap,
kCGEventTapOptionListenOnly,
kCGEventLeftMouseDown|kCGEventRightMouseDown|kCGEventOtherMouseDown,
__FVPreviewWindowMouseDown, (__bridge void *)self);
_mouseDownSource =
CFMachPortCreateRunLoopSource(CFAllocatorGetDefault(), _mouseDownTap, 0);
CFRunLoopAddSource(CFRunLoopGetCurrent(), _mouseDownSource,
kCFRunLoopDefaultMode);
}
@@ -124,7 +124,6 @@
- (void)dealloc
{
[self stopListening];
- [super dealloc];
}
- (BOOL)canBecomeKeyWindow { return _clickCount; }
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.h 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.h 2024-01-21
17:00:31 UTC (rev 28635)
@@ -47,7 +47,7 @@
}
- (id)initWithSplit:(NSUInteger)split;
-- (NSUInteger)split;
+@property (nonatomic, readonly) NSUInteger split;
- (void)addObject:(id)obj;
- (void)removeObject:(id)obj;
- (void)removeOldObjects;
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.m 2024-01-20
16:03:45 UTC (rev 28634)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVSplitSet.m 2024-01-21
17:00:31 UTC (rev 28635)
@@ -41,6 +41,8 @@
@implementation _FVSplitSet
+@synthesize split=_split;
+
- (id)initWithSplit:(NSUInteger)split
{
NSParameterAssert(split > 0);
@@ -55,15 +57,6 @@
- (id)init { return [self initWithSplit:100]; }
-- (void)dealloc
-{
- CFRelease(_old);
- CFRelease(_new);
- [super dealloc];
-}
-
-- (NSUInteger)split { return _split; }
-
- (void)addObject:(id)obj
{
if (_split == (NSUInteger)CFSetGetCount(_new)) {
@@ -82,7 +75,7 @@
- (void)removeOldObjects { CFSetRemoveAllValues(_old); }
-- (NSSet *)copyOldObjects { return [(NSSet
*)CFBridgingRelease(CFSetCreateCopy(CFGetAllocator(_old), _old)) retain]; }
+- (NSSet *)copyOldObjects { return (NSSet
*)CFBridgingRelease(CFSetCreateCopy(CFGetAllocator(_old), _old)); }
- (NSUInteger)count { return CFSetGetCount(_old) + CFSetGetCount(_new); }
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit