Wilson212
05-22-2011, 06:02 PM
I have been coding my own Framework over the last few weeks and i have come up with a question that i cant seem to find anywhere.
I have a Registry class, which uses a singlton object to create a static version of itself. And in that singleton object, i store other objects that are requested through out the rest of the script. My question is, even though im storing Non-static classes in that singleton, when i update a variable in those classes, will they be updated when they are called again later from that instance? Basically, does the singleton instance update the class as soon as something changes, or just in the current called instance of that class ( instance being, it was called in a function ).
I have a Registry class, which uses a singlton object to create a static version of itself. And in that singleton object, i store other objects that are requested through out the rest of the script. My question is, even though im storing Non-static classes in that singleton, when i update a variable in those classes, will they be updated when they are called again later from that instance? Basically, does the singleton instance update the class as soon as something changes, or just in the current called instance of that class ( instance being, it was called in a function ).