How To Unset Class Object

I’m new in yii framework

how to unset model class object after used?

Yii is PHP!

Some thoughts on PHP garbage collection

to unset attributes in models you may find function unsetAttributes(), in other cases it’s true you are writing with PHP, so




unset($obj) //sets to null, also frees memory

or

$obj = null //not sure about freeing memory

will unset $obj to null, or you can simply wait while variable will go out of scope for auto destroying by PHP