instance1 = class_A()
shelve["key1"] = instance1
So instance1
is a reference to an instance of class_A
stored in memory.
Does the above code dereferences the reference instance1
and stores the underlying object instance in shelve? Or does it only store the reference?
Because I don't want to store just the reference instance1
and when the program closes, the underlying object gets released, then the instance1
reference becomes invalid on next program start.