Permalink
Browse files

[r161181] Only abort() on OFObject inline ref counts being enabled wh…

…ile using

Instruments to track leaks in debug builds. This should allow QA to check for
leaked objects, but they won't have (and don't particularly need) the ref
count log.
  • Loading branch information...
1 parent 3350bc6 commit c8a7a262f66bd7a4309345756736b01730634bc6 @tjw tjw committed Feb 9, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 Frameworks/OmniFoundation/OFObject.m
@@ -130,7 +130,9 @@ static void OFCheckForInstruments(void)
// Make sure this is visible in the console amidst all the other noise.
for (unsigned i = 0; i < 10; i++)
fprintf(stderr, "ERROR: Both OFObject inline ref counting and Instruments's Allocations are enabled.\n");
+#ifdef DEBUG // We want QA to be able to run Instruments, and they don't necessarily need the full ref count log, just a list of leaked objects.
abort();
+#endif
}
}
#endif

0 comments on commit c8a7a26

Please sign in to comment.