Skip to content

Commit

Permalink
Fixed a retain loop in DMPaletteSectionView: DMPaletteContainer has a…
Browse files Browse the repository at this point in the history
… strong pointer to containerView, containerView has a strong pointer to palette sections, and palette section would have a strong pointer to the DMPaletteContainer. Fixed by making the 'container' pointer weak in DMPaletteSectionView.
  • Loading branch information
mz2 committed Dec 21, 2012
1 parent 5731bbe commit 85b1354
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DMInspectorPalette/DMPaletteSectionView.h
Expand Up @@ -23,10 +23,9 @@ enum {
@property (nonatomic,assign) DMPaletteState state; // Current state of the section (see DMPaletteState)
@property (nonatomic,assign) NSString* title; // Title of the header
@property (nonatomic,assign) NSUInteger index; // Current element index (assign it then use layoutSubviews to rearrange all the other items)
@property (strong) DMPaletteContainer* container; // Related section's container
@property (weak) DMPaletteContainer* container; // Related section's container
@property (readonly) NSView* contentView; // Section content view


// Initialize method
- (id)initWithContentView:(NSView *) contentView andTitle:(NSString *) headerTitle;

Expand Down

0 comments on commit 85b1354

Please sign in to comment.