Created
December 14, 2014 11:31
-
-
Save zhongge/f0bf5a7e7200e74f2fe9 to your computer and use it in GitHub Desktop.
What is the bug in this code and what is the consequence?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is no bug in compile. But It has memory leaks. Because of child.parent = parent when TTChild's @property (automic) TTParent *parent; | |
How to fix? | |
As a way of fixing, you can change the TTChild's parent property. | |
@property (atomic, assign) TTParent *parent;//use assign. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment