motion-memorymanagement 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,180 @@
1
+ static void *_MAZeroingWeakRefClassPresentToken = &_MAZeroingWeakRefClassPresentToken;
2
+ struct _NativeZWRTableEntry { BOOL isTable; void *ptr; };
3
+ static struct _NativeZWRTableEntry _MAZeroingWeakRefClassNativeWeakReferenceNotAllowedTable[256] = {
4
+ [0x3] = { 0, (unsigned char[]){ 0x5b, 0x81, 0x42, 0xa2, 0xe, 0x20, 0xd7, 0x39, 0xf1, 0xa4, 0xa8, 0x21, 0x86, 0x1d, 0xdc, 0xa5, 0xef, 0x9, 0x34 } }, // NSTableCellView
5
+ [0x5] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
6
+ [0xa] = { 0, (unsigned char[]){ 0x5a, 0x2f, 0xc3, 0xa6, 0xd5, 0xfb, 0xcf, 0xcc, 0x85, 0xf2, 0x2f, 0xea, 0x16, 0xeb, 0xbf, 0xcf, 0x9e, 0x52 } }, // NSBlock
7
+ [0x83] = { 0, (unsigned char[]){ 0xae, 0xc5, 0x56, 0x5, 0xce, 0xb3, 0xd5, 0x18, 0xe9, 0x30, 0xb7, 0x70, 0xf4, 0x78, 0xc9, 0xaf, 0xdd, 0x54 } }, // NSISNonNegativeVariableToBeMinimized
8
+ }},
9
+ [0x7] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
10
+ [0xf] = { 0, (unsigned char[]){ 0x52, 0xec, 0xf7, 0xb1, 0xe5, 0x2a, 0x7c, 0x39, 0xd4, 0x61, 0x17, 0x76, 0x26, 0x8e, 0x7a, 0x5c, 0x8f, 0xb2 } }, // NSISObjectiveVariable
11
+ [0x40] = { 0, (unsigned char[]){ 0x46, 0xca, 0xad, 0x6d, 0xcc, 0x49, 0x26, 0x3c, 0x81, 0xb8, 0xb, 0xe7, 0x21, 0xcc, 0x28, 0xcf, 0xc3, 0x24 } }, // NSATSGlyphStorage
12
+ }},
13
+ [0x8] = { 0, (unsigned char[]){ 0x82, 0x50, 0x66, 0x55, 0x76, 0x98, 0xb5, 0xb8, 0x56, 0x20, 0xd6, 0x1c, 0x7, 0x55, 0x4e, 0x32, 0xe0, 0xb1, 0x33 } }, // NSViewHierarchyLock
14
+ [0x9] = { 0, (unsigned char[]){ 0x11, 0x7b, 0x21, 0x90, 0x28, 0xc0, 0x39, 0x90, 0x9b, 0xc5, 0xa9, 0xf, 0xaf, 0x8, 0x43, 0x9e, 0xb9, 0x9d, 0xc3 } }, // NSTableOptions
15
+ [0xf] = { 0, (unsigned char[]){ 0x7d, 0x56, 0x74, 0xad, 0x93, 0x48, 0xe2, 0xbd, 0x2b, 0x5c, 0xb4, 0xf6, 0xf8, 0xd2, 0xfc, 0x47, 0xc0, 0xf4, 0xb9 } }, // _NSQuickLookWrapperDocumentWindow
16
+ [0x11] = { 0, (unsigned char[]){ 0xa3, 0x61, 0xe2, 0x7d, 0xb1, 0x3e, 0xe4, 0xe1, 0xd1, 0x7a, 0xd, 0xc4, 0x74, 0x52, 0x76, 0xb0, 0xb5, 0x7e, 0xb3 } }, // _NSScalarObjectID
17
+ [0x1a] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
18
+ [0x44] = { 0, (unsigned char[]){ 0x3b, 0x91, 0x94, 0xd2, 0x34, 0x5e, 0x4a, 0x18, 0xd9, 0x71, 0x17, 0x2c, 0xc4, 0xfa, 0x5a, 0x71, 0x4c, 0xb5 } }, // NSCorrectionSubPanel
19
+ [0xda] = { 0, (unsigned char[]){ 0x11, 0x4, 0xac, 0x59, 0xce, 0x58, 0x99, 0x8, 0x5, 0xae, 0xc7, 0x9f, 0x5f, 0x7c, 0x1e, 0xab, 0xf3, 0x12 } }, // NSISNonNegativeVariableWithDelegate
20
+ }},
21
+ [0x1c] = { 0, (unsigned char[]){ 0x90, 0xdf, 0xd3, 0x6e, 0xb0, 0x87, 0xd6, 0xc4, 0xa4, 0x33, 0xd9, 0x9f, 0xf9, 0xde, 0x69, 0xf4, 0x80, 0x7d, 0xf4 } }, // NSCorrectionPanel
22
+ [0x1d] = { 0, (unsigned char[]){ 0xfc, 0x3e, 0x70, 0x29, 0x9a, 0x6f, 0xbe, 0x9a, 0x3e, 0xe7, 0x56, 0x1e, 0x64, 0x13, 0xe9, 0x6a, 0xfd, 0xc9, 0xcd } }, // __NSSharedFontInstanceInfo
23
+ [0x1f] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
24
+ [0x3a] = { 0, (unsigned char[]){ 0x80, 0xbb, 0xa7, 0xc1, 0x41, 0xc9, 0xa5, 0x87, 0x46, 0x6c, 0xe8, 0x53, 0xf, 0x31, 0x2c, 0xe4, 0x82, 0xed } }, // NSToolbarConfigPanel
25
+ [0xf5] = { 0, (unsigned char[]){ 0x26, 0xc2, 0x40, 0xf7, 0x91, 0x16, 0x9f, 0x23, 0x4e, 0x23, 0xa4, 0xfd, 0xcf, 0xe0, 0xb7, 0x12, 0xbe, 0x5 } }, // _NSBrowserTableColumnViewController
26
+ }},
27
+ [0x20] = { 0, (unsigned char[]){ 0x45, 0xd6, 0x66, 0x4e, 0xd3, 0x46, 0xa2, 0x31, 0xbc, 0xd4, 0x91, 0xbb, 0xc6, 0x7f, 0xaf, 0x9a, 0x16, 0xf3, 0x55 } }, // NSSpellingPanel
28
+ [0x24] = { 0, (unsigned char[]){ 0x97, 0x38, 0x41, 0x2b, 0xe7, 0x18, 0x67, 0x62, 0x5, 0xdd, 0xdf, 0xc1, 0x57, 0x59, 0x49, 0xc4, 0x16, 0x32, 0x94 } }, // NSISVariableWithDelegate
29
+ [0x2b] = { 0, (unsigned char[]){ 0x1, 0xdd, 0xee, 0xa6, 0x38, 0xdf, 0x45, 0x52, 0x1, 0xa3, 0x33, 0x18, 0x2a, 0x2e, 0x17, 0x5, 0x96, 0x81, 0x4a } }, // NSManagedObjectID
30
+ [0x2d] = { 0, (unsigned char[]){ 0xb6, 0x84, 0x6b, 0x6a, 0xe6, 0x48, 0x56, 0xb4, 0xb8, 0xae, 0x9, 0x8f, 0x88, 0xd4, 0x9f, 0x71, 0x8d, 0x2b, 0xf4 } }, // NSSecureTextView
31
+ [0x33] = { 0, (unsigned char[]){ 0x46, 0x16, 0x4e, 0xe1, 0x47, 0x1a, 0x32, 0x82, 0x6e, 0xae, 0x61, 0xed, 0xf8, 0xe, 0x27, 0xa8, 0x76, 0xda, 0x8 } }, // __NSFontTypefaceInfo
32
+ [0x35] = { 0, (unsigned char[]){ 0xc2, 0x5e, 0x22, 0xd0, 0x4b, 0x59, 0x4a, 0xfe, 0xc7, 0xb2, 0xc, 0xb5, 0x8d, 0x7, 0x4b, 0xee, 0x4a, 0x35, 0x52 } }, // _NSFullScreenUnbufferedWindow
33
+ [0x37] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
34
+ [0x6f] = { 0, (unsigned char[]){ 0x70, 0x43, 0x47, 0x3f, 0x14, 0x9b, 0xf8, 0x1e, 0x57, 0xcb, 0x40, 0xd6, 0x54, 0xd4, 0xd1, 0x6f, 0xc6, 0x5e } }, // _NSSlideAndCrossFadeAnimationProjectionWindow
35
+ [0x72] = { 0, (unsigned char[]){ 0x9b, 0xcf, 0x5f, 0xcf, 0x88, 0x75, 0x72, 0x8e, 0xf1, 0x6c, 0xe5, 0xc8, 0x62, 0xc5, 0x5f, 0xe2, 0xcd, 0x5c } }, // NSNavNodeSharedServerController
36
+ }},
37
+ [0x38] = { 0, (unsigned char[]){ 0x60, 0x5c, 0x3f, 0xa3, 0xb, 0xc3, 0x8d, 0x3e, 0x7, 0x33, 0x1e, 0x54, 0xf3, 0xed, 0x88, 0x29, 0xe, 0xaf, 0xc3 } }, // NSNavFilepathInputController
38
+ [0x3a] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
39
+ [0x19] = { 0, (unsigned char[]){ 0x21, 0x87, 0xa7, 0x0, 0x57, 0xb5, 0x54, 0xdf, 0x53, 0x50, 0x57, 0xe7, 0x88, 0xf6, 0x85, 0x3d, 0x5e, 0x73 } }, // _NSBrowserMatrixColumnViewController
40
+ [0x29] = { 0, (unsigned char[]){ 0x2f, 0x44, 0xd9, 0xeb, 0x81, 0x1e, 0x89, 0x21, 0x38, 0x1a, 0xd1, 0x36, 0xf5, 0x1b, 0xb1, 0xf, 0xe2, 0xa5 } }, // NSAttributeDictionary
41
+ }},
42
+ [0x3d] = { 0, (unsigned char[]){ 0x84, 0x79, 0x16, 0x14, 0xdb, 0x72, 0x27, 0x5, 0xb1, 0x2b, 0x8c, 0xed, 0xfb, 0x1f, 0xe6, 0x65, 0x9b, 0xa3, 0x32 } }, // NSISVariable
43
+ [0x42] = { 0, (unsigned char[]){ 0x6e, 0xba, 0xa0, 0x45, 0x15, 0x86, 0x37, 0x4b, 0x30, 0x48, 0xe, 0x7b, 0xaf, 0xa, 0xd2, 0x75, 0x43, 0x10, 0xfb } }, // NSTableOptionsPanel
44
+ [0x43] = { 0, (unsigned char[]){ 0xac, 0xfb, 0xb9, 0xaa, 0xde, 0xc7, 0xe3, 0xe0, 0x91, 0x32, 0x60, 0xad, 0xfe, 0xd2, 0x44, 0xfe, 0x75, 0xbc, 0x6b } }, // NSAccessoryWindow
45
+ [0x44] = { 0, (unsigned char[]){ 0xe4, 0x9e, 0x1b, 0x5, 0xa9, 0x34, 0xa9, 0xd9, 0xc5, 0xa7, 0x5, 0x16, 0x3d, 0x4f, 0x15, 0x41, 0xa8, 0x45, 0x24 } }, // __NSOperationInternal
46
+ [0x45] = { 0, (unsigned char[]){ 0xb8, 0xcb, 0x9f, 0xea, 0x3a, 0xf2, 0xe3, 0x30, 0x9d, 0x53, 0xc5, 0x36, 0x95, 0x4a, 0x69, 0x55, 0xea, 0x85, 0xee } }, // NSNavSharedServerController
47
+ [0x48] = { 0, (unsigned char[]){ 0x57, 0x8c, 0x37, 0xc5, 0x34, 0x5, 0x21, 0x89, 0x5c, 0x4b, 0x15, 0x7, 0x9c, 0xb8, 0xff, 0x7b, 0x6e, 0xf1, 0xae } }, // NSWindow
48
+ [0x4a] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
49
+ [0xc] = { 0, (unsigned char[]){ 0xcd, 0x9e, 0xea, 0x1e, 0x8a, 0xea, 0xf, 0x0, 0xf3, 0xe7, 0x33, 0xb1, 0x6f, 0x5b, 0x42, 0x55, 0x55, 0x45 } }, // NSStringDrawingTextStorage
50
+ [0x3e] = { 0, (unsigned char[]){ 0xc4, 0xeb, 0x56, 0x8b, 0x5, 0x8a, 0xbb, 0xbe, 0xa0, 0xdb, 0x58, 0xd2, 0x5b, 0x99, 0xef, 0xc, 0x36, 0xc0 } }, // NSDocumentRevisionsTimelineWindow
51
+ }},
52
+ [0x4c] = { 0, (unsigned char[]){ 0x96, 0x73, 0x2, 0xb9, 0x44, 0xe3, 0x1f, 0xb, 0xaf, 0xab, 0xba, 0xf0, 0x1c, 0x1c, 0x12, 0x0, 0xb7, 0x86, 0xbf } }, // NSLocalWindowWrappingRemoteWindow
53
+ [0x4d] = { 0, (unsigned char[]){ 0xb2, 0x61, 0xa9, 0x77, 0x21, 0xee, 0x44, 0x1c, 0x86, 0xdc, 0xcd, 0x68, 0x7c, 0x6f, 0x6d, 0xf2, 0x93, 0xed, 0x1e } }, // NSNavAdvancedSearchController
54
+ [0x4e] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
55
+ [0xaa] = { 0, (unsigned char[]){ 0x67, 0xf8, 0xa5, 0xc8, 0x3e, 0x19, 0x3f, 0xc0, 0x9, 0x59, 0x79, 0x51, 0xa0, 0x8e, 0xeb, 0xfb, 0x77, 0x26 } }, // _CTNativeGlyphStorage
56
+ [0xd7] = { 0, (unsigned char[]){ 0xfc, 0xdd, 0x19, 0x16, 0xed, 0x7e, 0x9e, 0x83, 0x8e, 0x25, 0x5c, 0xa6, 0xe6, 0xe, 0xe1, 0x36, 0xc3, 0xb1 } }, // NSTokenTextView
57
+ }},
58
+ [0x50] = { 0, (unsigned char[]){ 0xb2, 0x2e, 0x2a, 0x97, 0xb4, 0x8, 0x61, 0xa9, 0x51, 0x72, 0x20, 0x74, 0xbf, 0x85, 0xe4, 0x54, 0xb3, 0x1a, 0x24 } }, // _NSCoreManagedObjectID
59
+ [0x52] = { 0, (unsigned char[]){ 0xb4, 0xcf, 0x19, 0x47, 0xb8, 0xd5, 0x65, 0x56, 0x75, 0xc0, 0x46, 0xd4, 0x3c, 0x9a, 0xf2, 0x21, 0x2f, 0xc5, 0xca } }, // _PFManagedObjectReferenceQueue
60
+ [0x53] = { 0, (unsigned char[]){ 0x4d, 0xe5, 0x8d, 0xa1, 0x40, 0xcb, 0x7a, 0x1a, 0x27, 0xd3, 0x89, 0x24, 0x39, 0xda, 0xd1, 0x46, 0x1c, 0xf0, 0x84 } }, // NSProgressPanel
61
+ [0x54] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
62
+ [0x77] = { 0, (unsigned char[]){ 0x65, 0xbb, 0x28, 0x9e, 0xbd, 0x9f, 0x5d, 0xc, 0x39, 0x70, 0x5b, 0xe7, 0x65, 0xcc, 0x3c, 0xcc, 0x4a, 0x6 } }, // NSMessagePort
63
+ [0xa4] = { 0, (unsigned char[]){ 0x4f, 0x92, 0x89, 0xe2, 0x3b, 0x49, 0x6e, 0x70, 0xe1, 0x75, 0x90, 0x79, 0xbb, 0x53, 0x5f, 0x4f, 0xcc, 0x3e } }, // NSColorPopoverController
64
+ }},
65
+ [0x59] = { 0, (unsigned char[]){ 0xed, 0xef, 0x25, 0x8c, 0xc5, 0x35, 0xe7, 0xa3, 0xa7, 0x5a, 0xcc, 0xd3, 0x75, 0x8, 0x43, 0xb2, 0xa, 0xee, 0xb2 } }, // NSPort
66
+ [0x5b] = { 0, (unsigned char[]){ 0x8a, 0x1d, 0xa9, 0x7e, 0x72, 0x5d, 0x70, 0x81, 0xcf, 0xc, 0xe0, 0xb8, 0x73, 0x8f, 0x5c, 0x85, 0xd6, 0xa1, 0xe1 } }, // _NSBrowserPreviewColumnViewController
67
+ [0x5f] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
68
+ [0x22] = { 0, (unsigned char[]){ 0x72, 0x59, 0x13, 0xf8, 0x71, 0xdb, 0x3a, 0xbe, 0xa0, 0x1b, 0xaf, 0xed, 0x76, 0xb, 0x9a, 0xf3, 0x5e, 0xd8 } }, // NSBasicObjectID
69
+ [0xc0] = { 0, (unsigned char[]){ 0x5e, 0x88, 0x3a, 0xb1, 0x91, 0x9c, 0xf9, 0x9d, 0x19, 0xfe, 0x79, 0xa9, 0x8f, 0x7a, 0x42, 0x3, 0x7c, 0x72 } }, // _NSSavePanelTextView
70
+ }},
71
+ [0x67] = { 0, (unsigned char[]){ 0xae, 0xaf, 0x59, 0x8c, 0xa3, 0x4a, 0xf8, 0xe9, 0xa, 0xe8, 0x7c, 0x18, 0x48, 0x0, 0x34, 0xbc, 0x4a, 0x69, 0x40 } }, // NSRulerMarkerPanel
72
+ [0x68] = { 0, (unsigned char[]){ 0x3a, 0x65, 0xf1, 0xba, 0x6a, 0x7f, 0xa7, 0xfb, 0x12, 0xe4, 0x1f, 0x53, 0x25, 0xad, 0x74, 0x88, 0xd, 0x73, 0x30 } }, // NSStatusBarWindow
73
+ [0x69] = { 0, (unsigned char[]){ 0x20, 0xef, 0xa7, 0x58, 0xa2, 0x8c, 0xc3, 0x20, 0xa1, 0xb8, 0xcd, 0x75, 0x46, 0x40, 0xfc, 0x5, 0xae, 0x61, 0xa } }, // NSToolbarFullScreenWindow
74
+ [0x6a] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
75
+ [0x16] = { 0, (unsigned char[]){ 0xaf, 0x44, 0x1, 0x18, 0x5e, 0x88, 0x4d, 0x10, 0x1c, 0x26, 0x2b, 0xf7, 0xca, 0xf4, 0x9, 0xb, 0x24, 0x8e } }, // NSCarbonWindow
76
+ [0x72] = { 0, (unsigned char[]){ 0x94, 0xde, 0xb9, 0xc4, 0x93, 0x86, 0xcc, 0x88, 0x1e, 0x3, 0x8b, 0x7f, 0x72, 0x7c, 0x51, 0x96, 0xfb, 0xba } }, // NSPrintPreviewController
77
+ }},
78
+ [0x6e] = { 0, (unsigned char[]){ 0x7, 0x4a, 0x8f, 0xd5, 0xad, 0xa6, 0xbf, 0x62, 0x15, 0x49, 0x9a, 0x98, 0xfb, 0x9e, 0x6c, 0x9a, 0x29, 0x5e, 0x45 } }, // NSTextView
79
+ [0x6f] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
80
+ [0x34] = { 0, (unsigned char[]){ 0x15, 0x3d, 0x33, 0x27, 0xe2, 0x98, 0x15, 0x6b, 0xd, 0xc5, 0xb0, 0x9, 0x8e, 0x8b, 0x22, 0x40, 0x88, 0x9c } }, // __NSATSStringSegment
81
+ [0xc5] = { 0, (unsigned char[]){ 0x6c, 0x2c, 0x2c, 0x37, 0xe2, 0x89, 0x72, 0x56, 0xb3, 0x7d, 0xb6, 0x2d, 0x67, 0x4c, 0xd0, 0x5f, 0x55, 0xc1 } }, // NSSubTextStorage
82
+ }},
83
+ [0x72] = { 0, (unsigned char[]){ 0x8d, 0x27, 0x74, 0x97, 0x62, 0x6, 0x8b, 0x6b, 0xec, 0x92, 0x51, 0x4a, 0xbd, 0x43, 0xc8, 0xaa, 0x6c, 0x58, 0x9 } }, // NSTextViewCompletionWindow
84
+ [0x73] = { 0, (unsigned char[]){ 0xb1, 0xc6, 0x4b, 0x54, 0xb0, 0x56, 0x42, 0x26, 0xd0, 0xc, 0xf4, 0x28, 0x23, 0x12, 0x37, 0xad, 0xb4, 0x7d, 0xac } }, // _NSFullScreenTransitionOverlayWindow
85
+ [0x75] = { 0, (unsigned char[]){ 0x4b, 0xe3, 0x5c, 0xb0, 0x20, 0x14, 0xca, 0x8c, 0x61, 0x60, 0xdc, 0x7a, 0xee, 0xf, 0x88, 0x19, 0x9f, 0xa7, 0x68 } }, // _PFTask
86
+ [0x76] = { 0, (unsigned char[]){ 0xf5, 0x2d, 0xe3, 0x23, 0x10, 0x98, 0x61, 0xac, 0x59, 0x99, 0x59, 0xda, 0x3d, 0x8d, 0xa6, 0xa, 0x67, 0x37, 0xc0 } }, // NSParagraphStyle
87
+ [0x77] = { 0, (unsigned char[]){ 0xe0, 0xd5, 0x7, 0x83, 0xa7, 0x2e, 0x7e, 0xba, 0xac, 0x6a, 0xaa, 0x97, 0x47, 0x4f, 0xb4, 0x26, 0xe8, 0xd5, 0xca } }, // _NSOrderOutAnimationProxyWindow
88
+ [0x7c] = { 0, (unsigned char[]){ 0xdd, 0x75, 0x76, 0xb0, 0xb1, 0xfc, 0xcb, 0x3e, 0xd7, 0x51, 0xe3, 0xf4, 0x93, 0x78, 0xd5, 0x27, 0xc2, 0x4c, 0xc4 } }, // NSPrintPanelOldAccessoryController
89
+ [0x7d] = { 0, (unsigned char[]){ 0x76, 0x18, 0xf6, 0x67, 0x49, 0xf0, 0x27, 0xd0, 0x31, 0x14, 0xf3, 0xce, 0x4d, 0x6e, 0x95, 0x26, 0x95, 0xa1, 0xb9 } }, // NSNavProgressStatusViewController
90
+ [0x7f] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
91
+ [0x18] = { 0, (unsigned char[]){ 0x3a, 0xe7, 0x3a, 0x47, 0xa1, 0x86, 0x5c, 0x8b, 0x3d, 0xad, 0x74, 0xe7, 0x7b, 0xa3, 0x71, 0xce, 0xb6, 0xed } }, // NSWindowController
92
+ [0xb5] = { 0, (unsigned char[]){ 0x68, 0x7e, 0xc6, 0xa1, 0xb8, 0x14, 0xb3, 0x1b, 0xd2, 0xec, 0xce, 0x99, 0x3e, 0x3, 0x72, 0x1d, 0x17, 0xce } }, // NSTextTab
93
+ }},
94
+ [0x83] = { 0, (unsigned char[]){ 0x11, 0x3f, 0x29, 0x8e, 0x75, 0xfa, 0x19, 0xca, 0x82, 0x5f, 0xc, 0xe6, 0x40, 0x60, 0x99, 0xa5, 0xcc, 0xb0, 0xd5 } }, // _NSFullScreenWindow
95
+ [0x84] = { 0, (unsigned char[]){ 0x5d, 0x46, 0x99, 0xf2, 0x6f, 0x3e, 0x70, 0xd0, 0x7, 0x4, 0x32, 0x68, 0x82, 0x5d, 0xad, 0xdb, 0x5d, 0x96, 0x89 } }, // NSISNonNegativeMarkerVariable
96
+ [0x89] = { 0, (unsigned char[]){ 0xe8, 0x30, 0xee, 0xf9, 0x87, 0x23, 0xd7, 0x55, 0x41, 0x71, 0xfe, 0xbd, 0x6a, 0x6a, 0x9, 0xf8, 0xa8, 0xa9, 0xb0 } }, // NSCarbonMenuWindow
97
+ [0x8e] = { 0, (unsigned char[]){ 0x3c, 0x39, 0xef, 0xfb, 0x5e, 0xbf, 0xfc, 0x69, 0x9f, 0xdb, 0xd7, 0x4c, 0x97, 0xaf, 0x9f, 0xc7, 0xbf, 0xe7, 0x5 } }, // __NSFinalizingBlock
98
+ [0x91] = { 0, (unsigned char[]){ 0x29, 0xe6, 0xff, 0x9c, 0xa8, 0x1b, 0x78, 0x33, 0x5e, 0xf5, 0xd6, 0xf6, 0xf3, 0x34, 0xa9, 0x27, 0x68, 0xdc, 0x48 } }, // NSISNonNegativeVariableWithDelegateToBeMinimized
99
+ [0x93] = { 0, (unsigned char[]){ 0x6b, 0x15, 0xf9, 0xf2, 0xb9, 0xfb, 0x86, 0x42, 0xb2, 0x9d, 0x76, 0xaa, 0x9a, 0x3e, 0xaf, 0x47, 0x3b, 0x4b, 0x97 } }, // _NSDuplicateDocumentAnimationProjectionWindow
100
+ [0x95] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
101
+ [0x1f] = { 0, (unsigned char[]){ 0xc2, 0x2d, 0x6b, 0x81, 0x8b, 0xc6, 0x6d, 0x62, 0x89, 0x92, 0x68, 0x5f, 0x4b, 0x54, 0x74, 0xbc, 0x1b, 0x43 } }, // NSExceptionAlertController
102
+ [0xca] = { 0, (unsigned char[]){ 0x6b, 0x18, 0xe4, 0xc5, 0xf8, 0x35, 0xae, 0x2c, 0xc1, 0x2c, 0xdc, 0xcd, 0xec, 0x4e, 0xca, 0x76, 0x94, 0x6 } }, // NSColorSpace
103
+ }},
104
+ [0x96] = { 0, (unsigned char[]){ 0x9f, 0x99, 0xf9, 0x49, 0x2a, 0xc, 0xfe, 0x8, 0x4e, 0xed, 0xd4, 0x2b, 0x69, 0x39, 0xef, 0x12, 0xba, 0x18, 0x2 } }, // NSToolTipPanel
105
+ [0x97] = { 0, (unsigned char[]){ 0x20, 0x8, 0xb2, 0x87, 0x77, 0xe3, 0xa4, 0x7e, 0xbe, 0x34, 0x6f, 0x84, 0x29, 0xa6, 0x21, 0x2a, 0x7f, 0xcc, 0xe } }, // __NSAutoBlock
106
+ [0x98] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
107
+ [0x4a] = { 0, (unsigned char[]){ 0xd, 0xf9, 0x7b, 0xf8, 0x20, 0x1c, 0xc6, 0x40, 0x43, 0x6, 0x7, 0x6c, 0x14, 0xd7, 0x25, 0x21, 0x25, 0xb7 } }, // NSSingleLineTypesetter
108
+ [0xb2] = { 0, (unsigned char[]){ 0xb6, 0xb4, 0x58, 0x5d, 0x2a, 0x3c, 0xc, 0xc8, 0x27, 0xe7, 0x6e, 0x63, 0x7, 0x7e, 0x53, 0xb2, 0x50, 0x59 } }, // NSCollectionViewItem
109
+ [0xdf] = { 0, (unsigned char[]){ 0xf3, 0x3a, 0x92, 0xb7, 0x1a, 0x77, 0x8f, 0xf7, 0x45, 0x92, 0xd0, 0x22, 0x18, 0xb0, 0xcc, 0xc5, 0x4f, 0x96 } }, // NSScalarObjectID64
110
+ }},
111
+ [0x9a] = { 0, (unsigned char[]){ 0x57, 0xa6, 0xe7, 0x54, 0xa2, 0xbc, 0xe6, 0x20, 0x28, 0x42, 0x60, 0x93, 0x3, 0x14, 0x9d, 0xdf, 0xdb, 0xda, 0x4f } }, // NSSidebarImage
112
+ [0x9d] = { 0, (unsigned char[]){ 0xb3, 0x81, 0xc4, 0xce, 0x4b, 0x48, 0x6d, 0x80, 0x6a, 0xf4, 0xe1, 0x31, 0xda, 0x8d, 0xc7, 0x83, 0xab, 0xc5, 0xa1 } }, // NSPanel
113
+ [0xa0] = { 0, (unsigned char[]){ 0x63, 0xb, 0xc2, 0xb6, 0xbe, 0xf6, 0xc3, 0x86, 0x47, 0x7, 0xe, 0xd8, 0xef, 0xff, 0x92, 0xe5, 0x31, 0xe9, 0x0 } }, // NSComboBoxWindow
114
+ [0xa2] = { 0, (unsigned char[]){ 0x83, 0x8d, 0xd0, 0xff, 0xa3, 0x36, 0x89, 0xef, 0x62, 0xbc, 0xb5, 0xd6, 0xbb, 0x7a, 0x4b, 0xf6, 0xf6, 0xb1, 0xfb } }, // NSViewController
115
+ [0xa6] = { 0, (unsigned char[]){ 0xe8, 0x41, 0xe7, 0xac, 0x58, 0xf6, 0x21, 0x64, 0x82, 0xad, 0xa8, 0x65, 0x1a, 0x54, 0x58, 0x8c, 0xd3, 0x54, 0xa0 } }, // _NSNonretainedFullScreenWindow
116
+ [0xa9] = { 0, (unsigned char[]){ 0x2f, 0xd9, 0xc0, 0xea, 0xae, 0x7d, 0x3, 0xd8, 0x5e, 0xbe, 0x67, 0xee, 0x5f, 0xb0, 0x60, 0xd0, 0x57, 0x7a, 0x5c } }, // _NSAutomaticFocusRingOverlayWindow
117
+ [0xaa] = { 0, (unsigned char[]){ 0x9b, 0x75, 0x33, 0xf, 0xa8, 0xfa, 0xda, 0x8d, 0x4a, 0xd6, 0x4c, 0x43, 0x12, 0x47, 0x4d, 0x10, 0xb2, 0xc0, 0xa0 } }, // NSNavProgressWindowController
118
+ [0xab] = { 0, (unsigned char[]){ 0xed, 0xd5, 0xe6, 0xe8, 0xac, 0x1, 0xd, 0x20, 0x57, 0x7f, 0x71, 0xfd, 0x18, 0xcc, 0x69, 0x72, 0xa, 0x1d, 0x42 } }, // _NSCachedAttributedString
119
+ [0xac] = { 0, (unsigned char[]){ 0x62, 0xbc, 0xb9, 0x26, 0xdd, 0x24, 0x3d, 0x3f, 0xc4, 0x26, 0x47, 0x50, 0xc6, 0xbb, 0x6b, 0x56, 0x93, 0x16, 0x2c } }, // NSLineFragmentRenderingContext
120
+ [0xad] = { 0, (unsigned char[]){ 0x75, 0xf9, 0xaa, 0x1b, 0xf9, 0x53, 0x93, 0x35, 0xe3, 0x16, 0x98, 0xfc, 0x7e, 0xe5, 0xec, 0x9b, 0xca, 0x64, 0xef } }, // NSFindPatternFieldEditor
121
+ [0xae] = { 0, (unsigned char[]){ 0xd, 0x3, 0x25, 0x76, 0x1f, 0x1f, 0x45, 0x58, 0x25, 0xb8, 0x8f, 0xa8, 0x37, 0x72, 0xfd, 0xf5, 0xb7, 0xf1, 0x85 } }, // PBOXMenuWindow
122
+ [0xb0] = { 0, (unsigned char[]){ 0x40, 0x9, 0xa1, 0xd9, 0xb4, 0xf, 0x4, 0xb6, 0x4, 0xd6, 0xd5, 0x7b, 0x9d, 0xdf, 0x9e, 0x8, 0xa2, 0xe4, 0xb7 } }, // NSMachPort
123
+ [0xb1] = { 0, (unsigned char[]){ 0x7e, 0x84, 0xd, 0x23, 0x8f, 0x79, 0x56, 0xff, 0x92, 0x40, 0x76, 0xb0, 0x6b, 0x81, 0x76, 0x96, 0xf, 0xc1, 0xa } }, // __NSAutoBlock__
124
+ [0xb4] = { 0, (unsigned char[]){ 0x69, 0x23, 0xfd, 0xe9, 0xf, 0x24, 0x19, 0xb7, 0xa7, 0x92, 0xe1, 0xed, 0x1b, 0xd1, 0xa0, 0xae, 0x64, 0x85, 0x87 } }, // NSExternalRefCountedData
125
+ [0xbc] = { 0, (unsigned char[]){ 0x7b, 0x3e, 0x3c, 0xe7, 0xe3, 0x14, 0x1b, 0x46, 0x77, 0x44, 0xdb, 0x43, 0xc3, 0xa4, 0xb9, 0x31, 0x66, 0x8, 0xc7 } }, // _NSFlippedImage
126
+ [0xbe] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
127
+ [0x66] = { 0, (unsigned char[]){ 0x1a, 0x9f, 0x99, 0xf3, 0x4a, 0xb9, 0xa7, 0xb0, 0x6, 0xad, 0xc1, 0x81, 0xdf, 0xe2, 0x1e, 0x1, 0x8b, 0xf4 } }, // _NSBorderlessLayerTreeProjectionWindow
128
+ [0xab] = { 0, (unsigned char[]){ 0x49, 0x7d, 0x5f, 0x63, 0xfe, 0xdc, 0xa7, 0x43, 0x43, 0xad, 0x24, 0x80, 0x6c, 0xeb, 0x36, 0x4, 0xd2, 0x9b } }, // NSFontPanel
129
+ }},
130
+ [0xbf] = { 0, (unsigned char[]){ 0x83, 0x4b, 0x26, 0xf2, 0xc3, 0x24, 0xc5, 0x64, 0x5d, 0x4c, 0x96, 0x86, 0xed, 0x42, 0x1c, 0x83, 0x5, 0x34, 0x8c } }, // NSNavProgressErrorViewController
131
+ [0xc1] = { 0, (unsigned char[]){ 0x94, 0xb4, 0x7c, 0xba, 0xa4, 0xf5, 0x3a, 0x43, 0x6, 0xa3, 0x84, 0x64, 0xeb, 0xf7, 0xe0, 0xe0, 0xb6, 0x98, 0x55 } }, // NSText
132
+ [0xc3] = { 0, (unsigned char[]){ 0x2e, 0x12, 0x59, 0xba, 0x72, 0xd7, 0x51, 0x40, 0x73, 0xe3, 0xe1, 0xfb, 0x1e, 0x97, 0xb0, 0xc5, 0xc1, 0xe4, 0xeb } }, // _NSTextFinderOverlayWindow
133
+ [0xcd] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
134
+ [0x1b] = { 0, (unsigned char[]){ 0x3b, 0x80, 0x3f, 0x14, 0x9c, 0xde, 0xad, 0x18, 0x4b, 0xe9, 0x44, 0xba, 0x1, 0x5f, 0x8, 0x98, 0xd6, 0x8c } }, // __NSStackBlock
135
+ [0x81] = { 0, (unsigned char[]){ 0xa9, 0x68, 0x44, 0x6c, 0xfc, 0x5b, 0x40, 0xfe, 0x10, 0xb4, 0xc3, 0x4e, 0x19, 0xfd, 0x57, 0x68, 0x6c, 0xcb } }, // NSFindPanel
136
+ }},
137
+ [0xd2] = { 0, (unsigned char[]){ 0x53, 0x40, 0xb2, 0xe9, 0xe7, 0xd8, 0xaa, 0xa9, 0x8c, 0x59, 0x99, 0x1, 0x9, 0x2b, 0xa9, 0x5a, 0x8c, 0x4, 0xa4 } }, // NSDocumentRevisionsWindow
138
+ [0xd9] = { 0, (unsigned char[]){ 0x9, 0x12, 0x39, 0x4d, 0xa4, 0x3, 0x8b, 0x2, 0x13, 0x4a, 0xc6, 0x58, 0xd5, 0x9e, 0x50, 0x4a, 0xf0, 0x2, 0x36 } }, // NSISNonNegativeVariable
139
+ [0xdb] = { 0, (unsigned char[]){ 0x1a, 0x27, 0xe4, 0x7, 0x22, 0xf5, 0x27, 0xc3, 0xcd, 0xc8, 0x2b, 0xb6, 0x2c, 0x25, 0x40, 0xf9, 0x46, 0xa4, 0x73 } }, // NSFont
140
+ [0xdc] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
141
+ [0x6] = { 0, (unsigned char[]){ 0x59, 0x16, 0xd4, 0x5a, 0xea, 0x6f, 0x8e, 0x8, 0xac, 0x89, 0xac, 0xb, 0x73, 0x2c, 0x62, 0x67, 0xff, 0x0 } }, // __NSFinalizingBlock__
142
+ [0x10] = { 0, (unsigned char[]){ 0xab, 0x59, 0x12, 0x43, 0x64, 0x12, 0x79, 0xe0, 0x82, 0xb3, 0xf9, 0xcd, 0x3b, 0xf4, 0x4d, 0x7b, 0x94, 0x25 } }, // NSPersistentUIEncodedReference
143
+ }},
144
+ [0xdd] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
145
+ [0x94] = { 0, (unsigned char[]){ 0x9b, 0xe, 0x2a, 0x0, 0x1b, 0x77, 0x4d, 0x1c, 0xe6, 0x22, 0x91, 0x1d, 0x0, 0xc4, 0xf2, 0x51, 0xaa, 0x77 } }, // NSFontManager
146
+ [0x97] = { 0, (unsigned char[]){ 0x91, 0x5, 0x67, 0xd4, 0xed, 0x70, 0xac, 0xca, 0x54, 0x91, 0x52, 0x9a, 0x83, 0x97, 0xd2, 0x27, 0x32, 0x45 } }, // NSDockMiniViewWindow
147
+ }},
148
+ [0xde] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
149
+ [0x5d] = { 0, (unsigned char[]){ 0x3d, 0x4e, 0xd6, 0x7a, 0x5c, 0x6b, 0xe7, 0x4a, 0x4c, 0xa, 0xbf, 0xbe, 0x5f, 0xdf, 0x48, 0x34, 0x80, 0xe8 } }, // NSBrowserColumnViewController
150
+ [0x96] = { 0, (unsigned char[]){ 0xa9, 0x1e, 0x9e, 0x35, 0x8f, 0x86, 0x47, 0x74, 0xd3, 0x6b, 0x36, 0x41, 0x53, 0x70, 0x40, 0x52, 0xaf, 0xcb } }, // __NSStackBlock__
151
+ }},
152
+ [0xe1] = { 0, (unsigned char[]){ 0xbf, 0xae, 0xbb, 0x5e, 0xb3, 0x4f, 0xa1, 0xe6, 0x4e, 0xb0, 0xd7, 0x78, 0x96, 0xba, 0x99, 0x51, 0xc6, 0x14, 0xbe } }, // NSNavPreviewController
153
+ [0xe5] = { 0, (unsigned char[]){ 0xf0, 0x45, 0x53, 0x1a, 0xc8, 0x5d, 0x6b, 0xec, 0x33, 0x26, 0xf6, 0x40, 0xbe, 0x49, 0x18, 0xab, 0xd1, 0x1d, 0xa8 } }, // NSPersistentUIWindowInfo
154
+ [0xe6] = { 0, (unsigned char[]){ 0x4f, 0x4f, 0xa8, 0x1f, 0x86, 0x21, 0x2b, 0x2c, 0xea, 0xab, 0xc4, 0xd5, 0x21, 0x66, 0x4c, 0xd8, 0x5b, 0xa0, 0x93 } }, // NSTypeSelectPanel
155
+ [0xe8] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
156
+ [0x58] = { 0, (unsigned char[]){ 0xc1, 0x9e, 0x22, 0x8f, 0x43, 0x27, 0xfc, 0xe4, 0x97, 0xfb, 0x26, 0xeb, 0x32, 0x7b, 0xaf, 0x83, 0xc1, 0x89 } }, // _NSMagnifierWindow
157
+ [0x8c] = { 0, (unsigned char[]){ 0x19, 0x95, 0x99, 0x16, 0xe0, 0x53, 0x7, 0xfd, 0xe0, 0xde, 0x1c, 0x45, 0x44, 0x2f, 0xa3, 0xaf, 0xee, 0x90 } }, // NSScalarObjectID48
158
+ }},
159
+ [0xe9] = { 0, (unsigned char[]){ 0xc6, 0x97, 0x40, 0x80, 0x2e, 0xc7, 0xd2, 0xbd, 0xc9, 0xd9, 0x7b, 0x21, 0x74, 0x23, 0x43, 0xf, 0xe1, 0x5a, 0x71 } }, // NSNavNodePreviewController
160
+ [0xea] = { 0, (unsigned char[]){ 0x2f, 0x9f, 0x2c, 0xbf, 0x6b, 0xa7, 0x23, 0x7e, 0x64, 0x70, 0xcc, 0x75, 0x9c, 0xa9, 0xbd, 0x70, 0x2c, 0xd1, 0x66 } }, // NSATSTypesetter
161
+ [0xec] = { 0, (unsigned char[]){ 0xd0, 0xc9, 0x57, 0xaf, 0xce, 0xfe, 0x15, 0xe7, 0xa3, 0xab, 0x2c, 0xda, 0x72, 0xae, 0xad, 0x17, 0x45, 0x86, 0xb1 } }, // _NSPopoverWindow
162
+ [0xf1] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
163
+ [0xa5] = { 0, (unsigned char[]){ 0x56, 0x9f, 0x8e, 0xfd, 0x1c, 0xc1, 0x5a, 0x15, 0xc5, 0x2, 0xd, 0x56, 0xb4, 0x1b, 0x70, 0x10, 0xdf, 0xa } }, // NSSavePanel
164
+ [0xf5] = { 0, (unsigned char[]){ 0xf3, 0x38, 0xe1, 0x77, 0x44, 0x43, 0x88, 0x4, 0x36, 0x2, 0x38, 0xfc, 0xfc, 0xfb, 0xa8, 0x17, 0x4c, 0xe } }, // _NSToolbarDefaultImageRepWindow
165
+ }},
166
+ [0xf2] = { 0, (unsigned char[]){ 0xce, 0x71, 0x3f, 0x21, 0x3, 0x1b, 0x57, 0x65, 0x33, 0xbf, 0xe7, 0x23, 0x4d, 0x99, 0x82, 0x1b, 0xb9, 0xf6, 0x34 } }, // NSISPureMarkerVariable
167
+ [0xf3] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
168
+ [0x66] = { 0, (unsigned char[]){ 0x95, 0xb6, 0xa7, 0x27, 0x66, 0x70, 0x2f, 0xc5, 0x4a, 0x38, 0xe6, 0x3b, 0x34, 0xd, 0x54, 0x21, 0x87, 0x8e } }, // NSTempAttributeDictionary
169
+ [0xb8] = { 0, (unsigned char[]){ 0x8a, 0xcf, 0x23, 0xe6, 0x69, 0xe8, 0x76, 0x42, 0x9d, 0xb1, 0x4a, 0x2, 0xb1, 0x9f, 0x84, 0xa4, 0x39, 0x3e } }, // NSISNonNegativeMarkerVariableToBeMinimized
170
+ [0xeb] = { 0, (unsigned char[]){ 0x5a, 0x8e, 0x70, 0xf6, 0xbf, 0x41, 0x37, 0x89, 0x2e, 0x94, 0x4b, 0x94, 0x23, 0x7d, 0x34, 0x6c, 0x46, 0xb4 } }, // NSOpenPanel
171
+ }},
172
+ [0xf7] = { 0, (unsigned char[]){ 0xcc, 0x3b, 0x53, 0x10, 0x6b, 0x29, 0xa6, 0x2c, 0xbd, 0xb4, 0x33, 0x8f, 0xa2, 0x46, 0x50, 0x9f, 0x97, 0xe6, 0x77 } }, // NSImage
173
+ [0xf9] = { 0, (unsigned char[]){ 0x89, 0x82, 0x91, 0xa7, 0xfc, 0x43, 0xee, 0x1b, 0x3, 0xef, 0xcc, 0x48, 0x8, 0x11, 0x51, 0x9b, 0x72, 0xe9, 0x14 } }, // NSNavNewFolderController
174
+ [0xfa] = { 0, (unsigned char[]){ 0x2c, 0xb3, 0xa5, 0x1a, 0xe1, 0xa0, 0x3, 0x94, 0x42, 0xe2, 0x6c, 0xaa, 0xa1, 0xf8, 0x23, 0xb2, 0x12, 0x8e, 0xfd } }, // NSMutableParagraphStyle
175
+ [0xfc] = { 1, (struct _NativeZWRTableEntry[256]) { // 1
176
+ [0xd4] = { 0, (unsigned char[]){ 0x7f, 0xea, 0x1b, 0x11, 0xbf, 0xeb, 0x92, 0x57, 0x23, 0x70, 0x9, 0x12, 0x89, 0xaf, 0x84, 0xa2, 0xdf, 0x31 } }, // NSNavProgressWindow
177
+ [0xd8] = { 0, (unsigned char[]){ 0x12, 0x31, 0x5f, 0x60, 0x61, 0x94, 0x7b, 0x74, 0xde, 0xd5, 0xf9, 0x34, 0x6a, 0x51, 0xff, 0x16, 0xef, 0x1e } }, // NSDrawerWindow
178
+ }},
179
+ [0xff] = { 0, (unsigned char[]){ 0xd7, 0x9a, 0x4b, 0x94, 0x11, 0xb7, 0xbb, 0xb8, 0x25, 0x4d, 0x34, 0x60, 0x80, 0x46, 0xdc, 0x3a, 0x95, 0xed, 0xe3 } }, // NSLazyBrowserCell
180
+ };
@@ -0,0 +1,7 @@
1
+ //
2
+ // Prefix header for all source files of the 'MMRuntime' target in the 'MMRuntime' project
3
+ //
4
+
5
+ #ifdef __OBJC__
6
+ #import <Foundation/Foundation.h>
7
+ #endif
@@ -0,0 +1,3 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ id MMAutoreleased(id(^block)(void));
@@ -0,0 +1,11 @@
1
+ #import "MMRuntime.h"
2
+
3
+ id MMAutoreleased(id(^block)(void))
4
+ {
5
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
6
+
7
+ id ret = block();
8
+
9
+ [pool release];
10
+ return ret;
11
+ }
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Motion::MemoryManagement
2
+
3
+ This gem provides weak references and autorelease pools for your ruby code!
4
+
5
+ ## Installation
6
+
7
+ ### Update your Rakefile
8
+
9
+ ```ruby
10
+ require 'motion-memorymanagement'
11
+ ```
12
+
13
+ ### Available API demos
14
+
15
+ ```ruby
16
+ class Test
17
+ def method
18
+ "hello"
19
+ end
20
+ end
21
+
22
+ t = Test.new
23
+ wt = t.weak!
24
+
25
+ wt.method # => "hello"
26
+
27
+ t = nil
28
+ wt.method # => nil
29
+ ```
30
+
31
+ ### Notes
32
+
33
+ Lots of thanks to Mike Ash for his MAZeroingWeakRef!
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,13 @@
1
+ .repl_history
2
+ build
3
+ tags
4
+ resources/*.nib
5
+ resources/*.momd
6
+ resources/*.storyboardc
7
+ .DS_Store
8
+ nbproject
9
+ .redcar
10
+ #*#
11
+ *~
12
+ *.sw[po]
13
+ .eprj
data/demoapp/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # -*- coding: utf-8 -*-
2
+ $:.unshift("/Library/RubyMotion/lib")
3
+ require 'motion/project'
4
+
5
+ $:<< (File.dirname(__FILE__) + '/../lib')
6
+ print "load path #{$:}\n"
7
+ require 'motion-memorymanagement'
8
+
9
+ Motion::Project::App.setup do |app|
10
+ # Use `rake config' to see complete project settings.
11
+ app.name = 'demoapp'
12
+ end
@@ -0,0 +1,5 @@
1
+ class AppDelegate
2
+ def application(application, didFinishLaunchingWithOptions:launchOptions)
3
+ true
4
+ end
5
+ end
@@ -0,0 +1,39 @@
1
+ describe "Memory management" do
2
+ it "keeps zero weak refs zeroed if referenced objects are gone" do
3
+ zwr = MMAutoreleased -> {
4
+ obj = "hello"
5
+ zwr = MAZeroingWeakRef.refWithTarget(obj).retain # that what happens if you neer to be smarter than runtime!
6
+ obj = nil
7
+ zwr
8
+ }
9
+ print "got weakRef #{zwr.class}"
10
+ zwr.target.should == nil
11
+ end
12
+
13
+ it "keeps zero weak refs alive if referenced objects are alive" do
14
+ obj = "hello"
15
+ zwr = obj.weak!
16
+ zwr.length.should == 5
17
+ end
18
+
19
+ it "works with the example code" do
20
+ class Test
21
+ def method
22
+ "hello"
23
+ end
24
+ end
25
+
26
+ t = MMAutoreleased -> {
27
+ t = Test.alloc.init.retain
28
+ }
29
+ wt = t.weak!
30
+
31
+ wt.method.should == "hello"
32
+
33
+ t.release
34
+ t.release # this is effectively first time I do that in all my ObjC practice!
35
+ t = nil
36
+
37
+ wt.method.should == nil
38
+ end
39
+ end
@@ -0,0 +1,23 @@
1
+ require "motion-memorymanagement/version"
2
+
3
+ Motion::Project::App.setup do |app|
4
+ # rip off from teacup. All this dependency injection sucks, can we haz better gem support?..
5
+ # scans app.files until it finds app/ (the default)
6
+ # if found, it inserts just before those files, otherwise it will insert to
7
+ # the end of the list
8
+ insert_point = 0
9
+ app.files.each_index do |index|
10
+ file = app.files[index]
11
+ if file =~ /^(?:\.\/)?app\//
12
+ # found app/, so stop looking
13
+ break
14
+ end
15
+ insert_point = index + 1
16
+ end
17
+
18
+ app.files.insert(insert_point, File.dirname(__FILE__) + '/motion-memorymanagement/runtime_helpers.rb')
19
+
20
+ mmRoot = File.expand_path(File.dirname(__FILE__) + '/../MMRuntime')
21
+ app.vendor_project(mmRoot, :static, :headers_dir => 'MMRuntime')
22
+ end
23
+
@@ -0,0 +1,5 @@
1
+ class Object
2
+ def weak!
3
+ MAZeroingWeakProxy.proxyWithTarget(self)
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Motion
2
+ module MemoryManagement
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/motion-memorymanagement/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Vladimir Pouzanov"]
6
+ gem.email = ["farcaller@gmail.com"]
7
+ gem.description = "Memory management (weak references and autorelease pools) for RubyMotion"
8
+ gem.summary = "Memory management for RubyMotion"
9
+ gem.homepage = ""
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "motion-memorymanagement"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Motion::MemoryManagement::VERSION
17
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: motion-memorymanagement
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Vladimir Pouzanov
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2013-01-23 00:00:00 +00:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: Memory management (weak references and autorelease pools) for RubyMotion
22
+ email:
23
+ - farcaller@gmail.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - .gitignore
32
+ - Gemfile
33
+ - LICENSE
34
+ - MMRuntime/MMRuntime.xcodeproj/project.pbxproj
35
+ - MMRuntime/MMRuntime/MANotificationCenterAdditions.h
36
+ - MMRuntime/MMRuntime/MANotificationCenterAdditions.m
37
+ - MMRuntime/MMRuntime/MAWeakArray.h
38
+ - MMRuntime/MMRuntime/MAWeakArray.m
39
+ - MMRuntime/MMRuntime/MAWeakDictionary.h
40
+ - MMRuntime/MMRuntime/MAWeakDictionary.m
41
+ - MMRuntime/MMRuntime/MAZeroingWeakProxy.h
42
+ - MMRuntime/MMRuntime/MAZeroingWeakProxy.m
43
+ - MMRuntime/MMRuntime/MAZeroingWeakRef.h
44
+ - MMRuntime/MMRuntime/MAZeroingWeakRef.m
45
+ - MMRuntime/MMRuntime/MAZeroingWeakRefNativeZWRNotAllowedTable.h
46
+ - MMRuntime/MMRuntime/MMRuntime-Prefix.pch
47
+ - MMRuntime/MMRuntime/MMRuntime.h
48
+ - MMRuntime/MMRuntime/MMRuntime.m
49
+ - README.md
50
+ - Rakefile
51
+ - demoapp/.gitignore
52
+ - demoapp/Rakefile
53
+ - demoapp/app/app_delegate.rb
54
+ - demoapp/spec/main_spec.rb
55
+ - lib/motion-memorymanagement.rb
56
+ - lib/motion-memorymanagement/runtime_helpers.rb
57
+ - lib/motion-memorymanagement/version.rb
58
+ - motion-memorymanagement.gemspec
59
+ has_rdoc: true
60
+ homepage: ""
61
+ licenses: []
62
+
63
+ post_install_message:
64
+ rdoc_options: []
65
+
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ segments:
73
+ - 0
74
+ version: "0"
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ segments:
80
+ - 0
81
+ version: "0"
82
+ requirements: []
83
+
84
+ rubyforge_project:
85
+ rubygems_version: 1.3.6
86
+ signing_key:
87
+ specification_version: 3
88
+ summary: Memory management for RubyMotion
89
+ test_files: []
90
+