diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-08 02:28:42 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-08 02:28:42 -0400 |
| commit | 5597606f188833979a7dbcf4a833e55e678f6e82 (patch) | |
| tree | 5ce4fe6376d7370f25d8d128141006f6eab21396 /new/button_darwin.m | |
| parent | d37bc67158228e75dc4f47cf445c771a890fb35a (diff) | |
Better monitoring of Objective-C objects (including main GUI objects).
Diffstat (limited to 'new/button_darwin.m')
| -rw-r--r-- | new/button_darwin.m | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/new/button_darwin.m b/new/button_darwin.m index 87c4525..d4b2a2b 100644 --- a/new/button_darwin.m +++ b/new/button_darwin.m @@ -1,6 +1,19 @@ // 7 april 2015 #import "uipriv_darwin.h" +#ifdef uiLogAllocations +@interface loggingNSButton : NSButton +@end + +@implementation loggingNSButton + +uiLogObjCClassAllocations + +@end +#else +#define loggingNSButton NSButton +#endif + @interface button : NSObject @property uiControl *c; @property void (*onClicked)(uiControl *, void *); @@ -30,7 +43,7 @@ uiControl *uiNewButton(const char *text) NSButton *bb; b = [button new]; - b.c = uiDarwinNewControl([NSButton class], NO, NO, b); + b.c = uiDarwinNewControl([loggingNSButton class], NO, NO, b); bb = (NSButton *) uiControlHandle(b.c); [bb setTitle:toNSString(text)]; |
