Created
August 29, 2013 16:42
-
-
Save victorhazbunanuff/6380518 to your computer and use it in GitHub Desktop.
managing memory
This file contains 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
function createPerson(name){ | |
var localPerson = new Object(); | |
localPerson.name = name; | |
return localPerson; | |
} | |
var globalPerson = createPerson("Nicholas"); | |
// do something with globalPerson | |
globalPerson = null; |
Author
victorhazbunanuff
commented
Aug 29, 2013
- Que sucede cuando garbage collector se ejecute?
- Des-referenciar la variable globalPerson es una buena o mala practica (en este caso)?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment