Everything I’ve seen about soft references has told me they work like this:
Using a soft reference means the referenced class will not be forced to load into memory
referenced class only takes up memory when it’s already there, or when the user specifies
However, let’s suppose I create a class called BigClass. It has a bunch of bloat in it and takes a good chunk of memory. Then I make another class, an Actor subclass called SoftTest. Inside SoftTest is nothing but a single variable, a soft reference to BigClass.
Why is BigClass loaded into memory when only SoftTest is placed in the scene? Like fresh editor, empty scene, use “Obj List class=BigClass_C”, no instances. Add SoftTest to the scene, suddenly there are instances in memory. I thought the point of soft references was to not take (much) memory space unless told otherwise.
If this is not the case, then please, help me understand what I’m missing
Okay sure, but that’s for soft class references… so then what are soft object references for? Is it to keep classes inside your referencee class from being loaded by the referencer? like for example if BigClass had soft references to other classes, they wouldn’t be loaded by SoftTest if it hard referenced BigClass?
Or i guess summarized:
if we had classes A, B, and C, and → means a reference link