Created
November 12, 2010 00:11
-
-
Save destroytoday/673487 to your computer and use it in GitHub Desktop.
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
// the old, lame way | |
protected var _property:Property; | |
public function get property():Property | |
{ | |
if (!_property) | |
{ | |
_property = new Property(); | |
} | |
return _property; | |
} |
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
// the new, hip way | |
protected var _property:Property; | |
public function get property():Property | |
{ | |
return _property ||= new Property(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment