mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 13:17:55 -05:00
Add copyWithZone: to OFBPathInfoCell
This is mainly to manually copy-construct the C++ instance counter that we use (in debug mode) to track leaks (or an erroneous extra release). For good measure we also set the spinTimer instance variable to nil. Though this functionality isn’t presently used, so hasn’t actually caused a problem.
This commit is contained in:
@@ -12,6 +12,14 @@
|
||||
@implementation OFBPathInfoCell
|
||||
@synthesize isOpen, isVisible, labelIndex, isLoading, spinTimer, mouseDownInCloseButton;
|
||||
|
||||
- (id)copyWithZone:(NSZone*)aZone
|
||||
{
|
||||
OFBPathInfoCell* res = [super copyWithZone:aZone];
|
||||
DB(new(&res->_instance_counter_helper) watch_leaks_OFBPathInfoCell(_instance_counter_helper));
|
||||
res->spinTimer = nil;
|
||||
return res;
|
||||
}
|
||||
|
||||
- (void)drawLabelIndex:(NSUInteger)labelColorIndex inFrame:(NSRect)cellFrame
|
||||
{
|
||||
if(labelColorIndex == 0)
|
||||
|
||||
Reference in New Issue
Block a user