You are currently browsing the CodeBot @ Work weblog archives for the day February 12, 2008.
- 3D Stuff (12)
- AI (1)
- BumpTop (5)
- C/C++ (22)
- Open Source (8)
- Radiant (11)
- Seneca (6)
- Stuff (17)
- The Mortal Realm (2)
- Uncategorized (14)
- win32 (12)
- July 9, 2010: On Visual Studio 2010...
- December 22, 2009: Efficient Rendering, A La Mark.
- December 3, 2009: A Simple Opponent
- December 3, 2009: Blog++
- September 7, 2009: Food Budgeting
- July 3, 2009: Too Busy...
- March 26, 2009: How Do Patents Apply To Me?
- February 27, 2009: U.S. And Human Rights
- February 7, 2009: I've Been Busy...
- November 10, 2008: Radiant Update
Archive for February 12, 2008
Et Tu Singletone.
February 12, 2008 by Mark.
Seems that my favorite pattern is also the bane of my current Game Engine development. Turns out that a singleton pattern doesn’t like to play nice with Dynamically Linked Libraries. The whole notion of being dynamic is counter productive to static members inside functions or classes. Looks like the only way to actually fix this is to wrap it all up in a big handler of some sort and have the calling code manage it. Either that or create a section of shared memory in the DLL and allow it to manage the singletons. Seems like a bit of a pain in the butt just to avoid a global variable. Hmm, unless I can wrap it in another creational pattern, possibly Builder or Abstract Factory…
More research is required. And research requires Tea. Therefore more Tea is required.
Posted in Radiant, Open Source, 3D Stuff, C/C++ | No Comments »