will my resource be free if i just change to null?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By potatobanana

hi, will my resource be free if i just change to null?
example, i have var item : itemsRes = itemsRes.new()
then i change it to item = null
will it free my previous resource?

:bust_in_silhouette: Reply From: exuin

Yes, Godot’s garbage collector will do that.