Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: chrome/browser/cocoa/objc_zombie.h

Issue 660411: [Mac] Implement NSObject zombies. (Closed)
Patch Set: Nits, and only enable in DEBUG for now. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chrome_browser_application_mac.mm ('k') | chrome/browser/cocoa/objc_zombie.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
6 #define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
7
8 #import <Foundation/Foundation.h>
9
10 // You should think twice every single time you use anything from this
11 // namespace.
12 namespace ObjcEvilDoers {
13
14 // Enable zombies. Returns NO if it fails to enable.
15 //
16 // When |zombieAllObjects| is YES, all objects inheriting from
17 // NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie
18 // is queried to determine whether to make the object a zombie.
19 //
20 // |zombieCount| controls how many zombies to store before freeing the
21 // oldest. Set to 0 to free objects immediately after making them
22 // zombies.
23 BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount);
24
25 // Disable zombies.
26 void ZombieDisable();
27
28 } // namespace ObjcEvilDoers
29
30 @interface NSObject (CrZombie)
31 - (BOOL)shouldBecomeCrZombie;
32 @end
33
34 #endif // CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_application_mac.mm ('k') | chrome/browser/cocoa/objc_zombie.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698