I know that ARC uses reference counting with compiler inserted increment and decrement operations when (strong) references are being set. It clears out the memory after the object's last reference group goes out of scope.
My question contains around having a var:
var key = NSData?
This by default is nil if no value present. Now after I assign it and than reassign the value to nil - key = NSData(). Will this remove that data from memory that was previously there?
Any helpful articles would be appreciated.
Aucun commentaire:
Enregistrer un commentaire