Fix a memory leak in _CPImageAndTextView. This closes #1888. #1889

Merged
merged 1 commit into from Apr 7, 2013

4 participants

@saikat

No description provided.

@cappbot

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

@aljungberg aljungberg commented on the diff Mar 31, 2013
AppKit/_CPImageAndTextView.j
@@ -319,9 +319,6 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
if (_image == anImage)
return;
- if ([_image delegate] === self)
- [[CPNotificationCenter defaultCenter] removeObserver:self name:CPImageDidLoadNotification object:_image];
-
@aljungberg
Cappuccino member

Even if we do remove the observer in imageDidLoad:, don't we want to remove the observer here too in case setImage: is called with a different image before imageDidLoad: occurs?

@saikat
saikat added a note Apr 6, 2013

Yes, I think you are correct. There will need to be a removeObserver before line 322. Should I add this as a commit to this pull request?

@aljungberg
Cappuccino member

Yeah just add another commit, that'd be great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ahankinson

-#new
+bug
+AppKit
+#needs-review

@cappbot

Milestone: Someday. Labels: #needs-review, AppKit, bug. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.

@ahankinson

@saikat Could you please respond to @aljungberg's comment? Should that section be deleted, or can it be re-added without any problems? Thanks.

@aljungberg aljungberg merged commit aa0602d into cappuccino:master Apr 7, 2013

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment