gdavis / FGallery-iPhone

Objective-C based gallery for iPhones
583 stars 144 forks source link

ARC version #35

Closed kasperfn closed 12 years ago

kasperfn commented 12 years ago

Does anybody have a FGallery project working with ARC? :)

(not -fno-objc-arc flag for files)

kasperfn commented 12 years ago

Nvm. I did it on my own. Have a nice day

apoorvnarang commented 11 years ago

How did you do it? Can you share the ARC version code please?

kasperfn commented 11 years ago

Just remove release, autorelease

and where 'NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];' is - make for example:

    @autoreleasepool {
    NSString *path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _fullsizeUrl];
    _fullsize = [UIImage imageWithContentsOfFile:path];

    _hasFullsizeLoaded = YES;
    _isFullsizeLoading = NO;

    [self performSelectorOnMainThread:@selector(didLoadFullsize) withObject:nil waitUntilDone:YES];
} 
mdikov commented 11 years ago

I used the conversion tool in Xcode and all works right away. The tool pretty much does the same. Sent from a mobile phone

On Dec 5, 2012, at 4:56 AM, Kasper F Nielsen notifications@github.com wrote:

Just remove release, autorealease and where 'NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];' is, make a for example: @autoreleasepool {

NSString *path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _fullsizeUrl];
_fullsize = [UIImage imageWithContentsOfFile:path];

_hasFullsizeLoaded = YES;
_isFullsizeLoading = NO;

[self performSelectorOnMainThread:@selector(didLoadFullsize) withObject:nil waitUntilDone:YES];

} — Reply to this email directly or view it on GitHub.

kasperfn commented 11 years ago

@mdikov Let him learn it the hard way ;)

craigreilly commented 11 years ago

ahh - thank you for this... much better functionality now with my 6 galleries.