let's say I have a data structure defined via script:
class_name PairedStrings
var stringA := ""
var stringB := ""
func _init(a, b):
stringA = a
stringB = b
I noticed that it's possible to call free()
on structures like this created via new()
so my vestigial instinct from GMS kicks in and tells me that I probably need to call free()
on these structures when I'm done using them. Is that actually necessary?
Example:
var myPS : PairedString
func setNewPairedString(a,b):
myPS.free() #do I need this line?
myPS = PairedString.new(a,b)