diff --git a/OpenUDID.m b/OpenUDID.m index cf31d49..7bc4af5 100644 --- a/OpenUDID.m +++ b/OpenUDID.m @@ -181,7 +181,7 @@ + (NSString*) valueWithError:(NSError **)error { // The AppUID will uniquely identify this app within the pastebins // - NSString * appUID = (NSString *) [defaults objectForKey:kOpenUDIDAppUIDKey]; + NSString * appUID = (NSString *) [[defaults objectForKey:kOpenUDIDAppUIDKey] retain]; if(appUID == nil) { // generate a new uuid and store it in user defaults @@ -346,6 +346,7 @@ + (NSString*) valueWithError:(NSError **)error { userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"OpenUDID succesfully retrieved",@"description", nil]]; } kOpenUDIDSessionCache = [openUDID retain]; + [appUID release]; return kOpenUDIDSessionCache; }