Click here to Skip to main content
15,896,912 members

Comments by Rock Bottom (Top 9 by date)

Rock Bottom 14-Feb-11 14:49pm View    
Yeah, I was just thinking whether or not that would be a valid way to solve this, provided we can guarantee only one instance of that class. I'm was just throwing it out there as we suspect that the initialization of static variables on the load of a DLL is the culprit. Also, it's always good to clean up the code and remove any stuff that doesn't make sense (such as all these statics).
Rock Bottom 14-Feb-11 14:18pm View    
So, would the same problem still happen with instance variables? I'm just trying to understand where the root of the problem is.
Rock Bottom 14-Feb-11 14:16pm View    
Dynamically.

So, would the same problem still happen with instance variables? I'm just trying to understand where the root of the problem is.
Rock Bottom 11-Feb-11 17:19pm View    
At this point, the app compiles and links, it's just that sometimes the objects or points get reset across the different scopes. A lot of the code that were statics probably shouldn't stay as statics, that's what I meant when I said they were abused.

I guess I'm just trying to understand what caused the problem so that I can start figuring out how to solve them.
Rock Bottom 11-Feb-11 16:51pm View    
Yeah, this is indeed legacy code from many years ago written by someone else. This is in Windows using Visual Studio 2008.

The main thing right now is just that, after we init an instance, next time we come back around, it becomes NULL again. We're suspecting it might have to do with the loading of different DLLs.