Why this codE has 21 output??Is unset means object destroyed??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why this codE has 21 output??Is unset means object destroyed???

https://www.sololearn.com/post/107296/?ref=app

3rd Jun 2019, 6:18 PM
Iqra
2 Answers
+ 3
Well, it clearly does
3rd Jun 2019, 6:26 PM
Airree
Airree - avatar
0
Basically a deconstructor is called after there are no references to an object. After using the unset function (not sure what it does), there were no references to the object (so garbage collection came to pick it up and the deconstructer was called)
3rd Jun 2019, 6:33 PM
Trigger
Trigger - avatar