Skip to content

Commit

Permalink
Follow Foundation memory rules (#435).
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueRiverInteractive committed Feb 27, 2015
1 parent ac77b5b commit 0b07f97
Show file tree
Hide file tree
Showing 63 changed files with 160 additions and 256 deletions.
2 changes: 2 additions & 0 deletions cocoatouch/src/main/bro-gen/addressbook.yaml
Expand Up @@ -354,6 +354,7 @@ functions:
ABPersonCopy(ImageData).*:
class: ABPerson
name: 'get#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
parameters:
person:
type: ABPerson
Expand Down Expand Up @@ -387,6 +388,7 @@ functions:
ABPerson(CreateVCardRepresentationWithPeople):
class: ABPerson
name: '#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
parameters:
people:
type: List<ABPerson>
Expand Down
2 changes: 1 addition & 1 deletion cocoatouch/src/main/bro-gen/assetslibrary.yaml
Expand Up @@ -35,7 +35,7 @@ classes:
completionBlock:
type: '@Block VoidBlock2<NSURL, NSError>'
'-writeModifiedVideoAtPathToSavedPhotosAlbum:completionBlock:':
name: writeModifiedVideoData
name: writeModifiedVideo
parameters:
completionBlock:
type: '@Block VoidBlock2<NSURL, NSError>'
Expand Down
11 changes: 9 additions & 2 deletions cocoatouch/src/main/bro-gen/avfoundation.yaml
Expand Up @@ -241,7 +241,8 @@ classes:
name: init
'-copyCGImageAtTime:actualTime:error:':
name: getCGImageAtTime
visibility: protected # throws NSErrorException
throws: NSErrorException
return_marshaler: CFType.NoRetainMarshaler
'-generateCGImagesAsynchronouslyForTimes:completionHandler:':
name: generateCGImagesAsynchronously
parameters:
Expand Down Expand Up @@ -296,6 +297,7 @@ classes:
methods:
'-copyNextSampleBuffer':
name: getNextSampleBuffer
return_marshaler: CFType.NoRetainMarshaler
'-resetForReadingTimeRanges:':
trim_after_first_colon: true
parameters:
Expand Down Expand Up @@ -1738,6 +1740,7 @@ classes:
trim_after_first_colon: true
'-copyPixelBufferForItemTime:itemTimeForDisplay:':
name: getPixelBufferForItemTime
return_marshaler: CFType.NoRetainMarshaler
'-setDelegate:queue:':
trim_after_first_colon: true
'-requestNotificationOfMediaDataChangeWithAdvanceInterval:':
Expand Down Expand Up @@ -1867,6 +1870,7 @@ classes:
name: init
'-copyFormatDescription':
name: getFormatDescription
return_marshaler: CFType.NoRetainMarshaler
AVURLAsset: # DONE
methods:
'-initWithURL:options:':
Expand Down Expand Up @@ -1947,7 +1951,10 @@ classes:
type: CGRect.CGRectPtr
timeRange:
type: CMTimeRange.CMTimeRangePtr
AVVideoCompositionRenderContext: {} # DONE
AVVideoCompositionRenderContext: # DONE
methods:
'-newPixelBuffer':
return_marshaler: CFType.NoRetainMarshaler

protocols:
AVAssetResourceLoaderDelegate: # DONE
Expand Down
7 changes: 5 additions & 2 deletions cocoatouch/src/main/bro-gen/cloudkit.yaml
Expand Up @@ -33,7 +33,7 @@ enums:
CKRecordZoneCapabilities: {}
CKReferenceAction: {}
CKSubscriptionType: {}
CKSubscriptionOptions: {}
CKSubscriptionOptions: { prefix: CKSubscriptionOptionsFires }
CKRecordSavePolicy: {}

classes:
Expand Down Expand Up @@ -382,8 +382,11 @@ classes:
methods:
'-init':
exclude: true
'-init.*':
'-initWithNotificationIDsToMarkRead:':
name: init
parameters:
notificationIDs:
type: NSArray<CKNotificationID>
CKModifyBadgeOperation: # DONE
methods:
'-init':
Expand Down
3 changes: 0 additions & 3 deletions cocoatouch/src/main/bro-gen/corebluetooth.yaml
Expand Up @@ -21,9 +21,6 @@ enums:
CBPeripheralManagerConnectionLatency: {}

classes:
CoreBluetooth:
annotations: ['@Marshaler(NSString.AsStringMarshaler.class)']

CBError:
extends: NSError
CBATTError:
Expand Down
20 changes: 12 additions & 8 deletions cocoatouch/src/main/bro-gen/coredata.yaml
Expand Up @@ -12,7 +12,7 @@ enums:
NSDeleteRule: {first: NSNoActionDeleteRule, suffix: DeleteRule, type: MachineUInt}
NSEntityMappingType: {first: NSUndefinedEntityMappingType, suffix: EntityMappingType, type: MachineUInt}
NSFetchedResultsChangeType: {first: NSFetchedResultsChangeInsert, type: MachineUInt}
NSFetchRequestResultType: {first: NSManagedObjectResultType, suffix: ResultType, type: MachineUInt}
NSFetchRequestResultType: {first: NSManagedObjectResultType, skip_none: true, suffix: ResultType, type: MachineUInt}
NSManagedObjectContextConcurrencyType: {first: NSConfinementConcurrencyType, suffix: ConcurrencyType, type: MachineUInt}
NSMergePolicyType: {first: NSErrorMergePolicyType, suffix: MergePolicyType, type: MachineUInt}
NSPersistentStoreRequestType: {first: NSFetchRequestType, suffix: RequestType, type: MachineUInt}
Expand Down Expand Up @@ -58,6 +58,7 @@ classes:
visibility: protected # throws NSErrorException
'-newCacheNodeForManagedObject:':
name: newCacheNode
return_marshaler: NSObject.NoRetainMarshaler
'-updateCacheNode:fromManagedObject:':
name: updateCacheNode
'-cacheNodes':
Expand All @@ -79,6 +80,7 @@ classes:
name: getObjectID
'-newReferenceObjectForManagedObject:':
name: newReferenceObject
return_marshaler: NSObject.NoRetainMarshaler
'-referenceObjectForObjectID:':
name: getReferenceObject
NSAtomicStoreCacheNode: # DONE
Expand Down Expand Up @@ -120,7 +122,7 @@ classes:
type: '@org.robovm.rt.bro.annotation.Marshaler(NSDictionary.AsStringMapMarshaler.class) Map<String, NSRelationshipDescription>'
methods:
'-relationshipsWithDestinationEntity:':
name: getRelationshipsWith
name: getRelationshipsWithDestination
return_type: NSArray<NSRelationshipDescription>
'-isKindOfEntity:':
trim_after_first_colon: true
Expand Down Expand Up @@ -210,21 +212,22 @@ classes:
NSIncrementalStore: # DONE
methods:
'-loadMetadata:':
trim_after_first_colon: true
visibility: protected # throws NSErrorException
exclude: true
'-executeRequest:withContext:error:':
trim_after_first_colon: true
visibility: protected # throws NSErrorException
throws: NSErrorException
'-newValuesForObjectWithID:withContext:error:':
name: newValuesForObjectID
visibility: protected # throws NSErrorException
return_marshaler: NSObject.NoRetainMarshaler
throws: NSErrorException
'-newValueForRelationship:forObjectWithID:withContext:error:':
trim_after_first_colon: true
visibility: protected # throws NSErrorException
return_marshaler: NSObject.NoRetainMarshaler
throws: NSErrorException
'-obtainPermanentIDsForObjects:error:':
trim_after_first_colon: true
return_type: NSArray<NSManagedObjectID>
visibility: protected # throws NSErrorException
throws: NSErrorException
parameters:
array:
type: NSArray<NSManagedObject>
Expand All @@ -240,6 +243,7 @@ classes:
type: NSArray<NSManagedObjectID>
'-newObjectIDForEntity:referenceObject:':
trim_after_first_colon: true
return_marshaler: NSObject.NoRetainMarshaler
'-referenceObjectForObjectID:':
name: getReferenceObjectForID
'+identifierForNewStoreAtURL:':
Expand Down
3 changes: 1 addition & 2 deletions cocoatouch/src/main/bro-gen/corefoundation.yaml
Expand Up @@ -58,8 +58,7 @@ enums:
CFStringTokenizerUnitOptions: {first: kCFStringTokenizerUnitWord, bits: true, marshaler: Bits.AsMachineSizedIntMarshaler}
CFTimeZoneNameStyle: {}
CFURLBookmarkCreationOptions: {}
CFURLBookmarkResolutionOptions2: {first: kCFURLBookmarkResolutionWithSecurityScope, merge_with: CFURLBookmarkResolutionOptions, prefix: kCFURLBookmarkResolution}
CFURLBookmarkResolutionOptions: {first: kCFBookmarkResolutionWithoutUIMask, prefix: kCFBookmarkResolution, bits: true}
CFURLBookmarkResolutionOptions: {first: kCFURLBookmarkResolutionWithSecurityScope, prefix: kCFURLBookmarkResolution, ignore: kCFBookmarkResolution, bits: true }
CFURLComponentType: {}
CFURLEnumeratorOptions: {}
CFURLEnumeratorResult: {}
Expand Down
4 changes: 4 additions & 0 deletions cocoatouch/src/main/bro-gen/coregraphics.yaml
Expand Up @@ -248,6 +248,7 @@ functions:
CGColorSpaceCopy(ICCProfile):
class: CGColorSpace
name: 'get#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
CGColorSpace(GetColorTable):
class: CGColorSpace
name: '#{g[0]}'
Expand Down Expand Up @@ -395,6 +396,7 @@ functions:
class: CGDataProvider
name: 'get#{g[0]}'
return_type: NSData
return_marshaler: NSObject.NoRetainMarshaler
CGDataProvider(.*):
class: CGDataProvider
name: '#{g[0]}'
Expand Down Expand Up @@ -806,6 +808,7 @@ functions:
class: CGPDFStream
name: 'get#{g[0]}'
visibility: private
return_marshaler: NSObject.NoRetainMarshaler
CGPDFStream(.*):
class: CGPDFStream
name: '#{g[0]}'
Expand All @@ -824,6 +827,7 @@ functions:
class: CGPDFString
name: 'get#{g[0]}'
return_type: NSDate
return_marshaler: NSObject.NoRetainMarshaler
CGPDFString(.*):
class: CGPDFString
name: '#{g[0]}'
Expand Down
2 changes: 2 additions & 0 deletions cocoatouch/src/main/bro-gen/coreimage.yaml
Expand Up @@ -48,8 +48,10 @@ classes:
name: render
'-createCGImage.*':
name: createCGImage
return_marshaler: CFType.NoRetainMarshaler
'-createCGLayer.*':
name: createCGLayer
return_marshaler: CFType.NoRetainMarshaler
CIDetector: # DONE
methods:
'+detectorOfType:context:options:':
Expand Down
9 changes: 9 additions & 0 deletions cocoatouch/src/main/bro-gen/coreservices.yaml
Expand Up @@ -81,6 +81,7 @@ functions:
CFReadStreamCreateWithFTPURL:
class: CFFTPStream
name: createReadStream
return_marshaler: NSObject.NoRetainMarshaler
CFFTP(CreateParsedResourceListing):
class: CFFTPStream
name: '#{g[0]}'
Expand All @@ -93,6 +94,7 @@ functions:
CFWriteStreamCreateWithFTPURL:
class: CFFTPStream
name: createWriteStream
return_marshaler: NSObject.NoRetainMarshaler

# CFHost
CFHost(Create)With.*:
Expand Down Expand Up @@ -152,6 +154,7 @@ functions:
class: CFHTTPAuthentication
name: 'get#{g[0]}'
return_type: NSArray<NSURL>
return_marshaler: NSObject.NoRetainMarshaler
CFHTTPAuthenticationCopy(.*):
class: CFHTTPAuthentication
name: 'get#{g[0]}'
Expand Down Expand Up @@ -196,6 +199,10 @@ functions:
class: CFHTTPMessage
name: 'get#{g[0]}'
return_marshaler: CFString.AsStringNoRetainMarshaler
CFHTTPMessageCopy(SerializedMessage|RequestURL):
class: CFHTTPMessage
name: 'get#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
CFHTTPMessageCopy(.*):
class: CFHTTPMessage
name: 'get#{g[0]}'
Expand Down Expand Up @@ -231,6 +238,7 @@ functions:
CFReadStream(Create).*:
class: CFHTTPStream
name: '#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
CFHTTPReadStream(.*):
class: CFHTTPStream
name: '#{g[0]}'
Expand Down Expand Up @@ -328,6 +336,7 @@ functions:
class: CFNetService
name: createTXTData
visibility: protected
return_marshaler: NSObject.NoRetainMarshaler
parameters:
keyValuePairs:
type: 'NSDictionary<NSString, NSData>'
Expand Down
4 changes: 4 additions & 0 deletions cocoatouch/src/main/bro-gen/coretext.yaml
Expand Up @@ -300,6 +300,10 @@ functions:
name: 'get#{g[0]}'
return_type: List<String>
return_marshaler: CFArray.AsStringListMarshaler
CTFontCopy(Table):
class: CTFont
name: 'get#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
CTFont(GetGlyphs)ForCharacters:
class: CTFont
name: '#{g[0]}'
Expand Down
7 changes: 3 additions & 4 deletions cocoatouch/src/main/bro-gen/foundation.yaml
Expand Up @@ -151,8 +151,7 @@ enums:
NSTimeZoneNameStyle: {}
NSUbiquitousKeyValueStoreChangeReason: { first: NSUbiquitousKeyValueStoreServerChange }
NSURLBookmarkCreationOptions: {}
NSURLBookmarkResolutionOptions: {}
NSURLBookmarkResolutionOptions: {}
NSURLBookmarkResolutionOptions: {prefix: NSURLBookmarkResolution}
NSURLCacheStoragePolicy: { first: NSURLCacheStorageAllowed, marshaler: ValuedEnum.AsMachineSizedUIntMarshaler }
NSURLCredentialPersistence: {}
NSURLErrorCode: { first: NSURLErrorUnknown }
Expand Down Expand Up @@ -1802,8 +1801,8 @@ classes:
'-.*': {exclude: true}
NSLock: # DONE
methods:
'-lock.*':
name: lock
'-lockBeforeDate:':
name: lockBefore
NSMachPort: # DONE
methods:
'-delegate':
Expand Down
4 changes: 4 additions & 0 deletions cocoatouch/src/main/bro-gen/glkit.yaml
Expand Up @@ -152,6 +152,10 @@ functions:
GLKMatrixStack(Rotate)With.*:
class: GLKMatrixStack
name: '#{g[0]}'
GLKMatrixStack(Create):
class: GLKMatrixStack
name: '#{g[0]}'
return_marshaler: CFType.NoRetainMarshaler
GLKMatrixStack(.*):
class: GLKMatrixStack
name: '#{g[0]}'
Expand Down
4 changes: 4 additions & 0 deletions cocoatouch/src/main/bro-gen/imageio.yaml
Expand Up @@ -141,6 +141,10 @@ functions:
exclude: true
CGImageMetadataSetValueMatchingImageProperty:
exclude: true
CGImageMetadata(CreateXMPData):
class: CGImageMetadata
name: '#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
CGImageMetadata(.*):
class: CGImageMetadata
name: '#{g[0]}'
Expand Down

0 comments on commit 0b07f97

Please sign in to comment.