Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Fix leak of some associated properties in AutoLayout.mm#1461

Merged
jaredhms merged 1 commit into
microsoft:developfrom
ehren:autolayout-associated-leak
Nov 28, 2016
Merged

Fix leak of some associated properties in AutoLayout.mm#1461
jaredhms merged 1 commit into
microsoft:developfrom
ehren:autolayout-associated-leak

Conversation

@ehren

@ehren ehren commented Nov 27, 2016

Copy link
Copy Markdown
Contributor

Missing some releases.

Note: original pull also included calls to explicitly break the associations (by calling objc_setAssociatedObject with nil on autoLayoutDealloc), citing this page
https://web.archive.org/web/20120818164935/http://developer.apple.com/library/ios/#/web/20120820002100/http://developer.apple.com/library/ios/documentation/cocoa/conceptual/objectivec/Chapters/ocAssociativeReferences.html

However, as verified here https://github.com/Microsoft/WinObjC/blob/812d6636036a8d2eaeaaf7b92aa0c7b76252e190/tests/unittests/Starboard/objcrt_assoc.mm#L146 (and by manual testing) it's not necessary to manually nil out the associated objects with an objc_setAssociatedObject call.


This change is Reviewable

@ehren ehren force-pushed the autolayout-associated-leak branch from c415cfe to ab7c99c Compare November 27, 2016 20:54
@ehren ehren changed the title Fix leaks associated with objc_setAssociatedObject use in AutoLayout.mm Fix leak of some associated properties in AutoLayout.mm Nov 27, 2016
@jaredhms jaredhms self-assigned this Nov 28, 2016
@oliversa-msft

Copy link
Copy Markdown
Contributor

:shipit:

1 similar comment
@jaredhms

Copy link
Copy Markdown
Contributor

:shipit:

@jaredhms

Copy link
Copy Markdown
Contributor

In CI build.

@jaredhms jaredhms merged commit 704d169 into microsoft:develop Nov 28, 2016
ehren added a commit to ehren/WinObjC that referenced this pull request Nov 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants