summaryrefslogtreecommitdiff
path: root/new/uipriv_darwin.h
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-08 00:26:49 -0400
committerPietro Gagliardi <[email protected]>2015-04-08 00:27:03 -0400
commit521829a0a66f62e9ed4256440a1ed34565e4d51f (patch)
tree3e82d723ff48ff94e8c09f7766de54fa916b7efe /new/uipriv_darwin.h
parent1d828c8debab274f7b058e3474e2494dfccb0c19 (diff)
Added allocation logging to Objective-C objects. Fixed some Mac OS X build issues.
Diffstat (limited to 'new/uipriv_darwin.h')
-rw-r--r--new/uipriv_darwin.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/new/uipriv_darwin.h b/new/uipriv_darwin.h
index dd3467a..e1b38af 100644
--- a/new/uipriv_darwin.h
+++ b/new/uipriv_darwin.h
@@ -11,6 +11,24 @@
struct uiSizing {
};
+#ifdef uiLogAllocations
+#import <stdio.h>
+#define uiLogObjCClassAllocations \
+- (id)init \
+{ \
+ self = [super init]; \
+ fprintf(stderr, "%p alloc %s\n", self, [[self className] UTF8String]); \
+ return self; \
+} \
+- (void)dealloc \
+{ \
+ [super dealloc]; \
+ fprintf(stderr, "%p free\n", self); \
+}
+#else
+#define uiLogObjCClassAllocations
+#endif
+
// util_darwin.m
extern void setStandardControlFont(NSControl *);