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).*: ABPersonCopy(ImageData).*:
class: ABPerson class: ABPerson
name: 'get#{g[0]}' name: 'get#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
parameters: parameters:
person: person:
type: ABPerson type: ABPerson
Expand Down Expand Up @@ -387,6 +388,7 @@ functions:
ABPerson(CreateVCardRepresentationWithPeople): ABPerson(CreateVCardRepresentationWithPeople):
class: ABPerson class: ABPerson
name: '#{g[0]}' name: '#{g[0]}'
return_marshaler: NSObject.NoRetainMarshaler
parameters: parameters:
people: people:
type: List<ABPerson> 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: completionBlock:
type: '@Block VoidBlock2<NSURL, NSError>' type: '@Block VoidBlock2<NSURL, NSError>'
'-writeModifiedVideoAtPathToSavedPhotosAlbum:completionBlock:': '-writeModifiedVideoAtPathToSavedPhotosAlbum:completionBlock:':
name: writeModifiedVideoData name: writeModifiedVideo
parameters: parameters:
completionBlock: completionBlock:
type: '@Block VoidBlock2<NSURL, NSError>' 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 name: init
'-copyCGImageAtTime:actualTime:error:': '-copyCGImageAtTime:actualTime:error:':
name: getCGImageAtTime name: getCGImageAtTime
visibility: protected # throws NSErrorException throws: NSErrorException
return_marshaler: CFType.NoRetainMarshaler
'-generateCGImagesAsynchronouslyForTimes:completionHandler:': '-generateCGImagesAsynchronouslyForTimes:completionHandler:':
name: generateCGImagesAsynchronously name: generateCGImagesAsynchronously
parameters: parameters:
Expand Down Expand Up @@ -296,6 +297,7 @@ classes:
methods: methods:
'-copyNextSampleBuffer': '-copyNextSampleBuffer':
name: getNextSampleBuffer name: getNextSampleBuffer
return_marshaler: CFType.NoRetainMarshaler
'-resetForReadingTimeRanges:': '-resetForReadingTimeRanges:':
trim_after_first_colon: true trim_after_first_colon: true
parameters: parameters:
Expand Down Expand Up @@ -1738,6 +1740,7 @@ classes:
trim_after_first_colon: true trim_after_first_colon: true
'-copyPixelBufferForItemTime:itemTimeForDisplay:': '-copyPixelBufferForItemTime:itemTimeForDisplay:':
name: getPixelBufferForItemTime name: getPixelBufferForItemTime
return_marshaler: CFType.NoRetainMarshaler
'-setDelegate:queue:': '-setDelegate:queue:':
trim_after_first_colon: true trim_after_first_colon: true
'-requestNotificationOfMediaDataChangeWithAdvanceInterval:': '-requestNotificationOfMediaDataChangeWithAdvanceInterval:':
Expand Down Expand Up @@ -1867,6 +1870,7 @@ classes:
name: init name: init
'-copyFormatDescription': '-copyFormatDescription':
name: getFormatDescription name: getFormatDescription
return_marshaler: CFType.NoRetainMarshaler
AVURLAsset: # DONE AVURLAsset: # DONE
methods: methods:
'-initWithURL:options:': '-initWithURL:options:':
Expand Down Expand Up @@ -1947,7 +1951,10 @@ classes:
type: CGRect.CGRectPtr type: CGRect.CGRectPtr
timeRange: timeRange:
type: CMTimeRange.CMTimeRangePtr type: CMTimeRange.CMTimeRangePtr
AVVideoCompositionRenderContext: {} # DONE AVVideoCompositionRenderContext: # DONE
methods:
'-newPixelBuffer':
return_marshaler: CFType.NoRetainMarshaler


protocols: protocols:
AVAssetResourceLoaderDelegate: # DONE 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: {} CKRecordZoneCapabilities: {}
CKReferenceAction: {} CKReferenceAction: {}
CKSubscriptionType: {} CKSubscriptionType: {}
CKSubscriptionOptions: {} CKSubscriptionOptions: { prefix: CKSubscriptionOptionsFires }
CKRecordSavePolicy: {} CKRecordSavePolicy: {}


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


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

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


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

0 comments on commit 0b07f97

Please sign in to comment.