You are currently browsing the CodeBot @ Work weblog archives for the day February 12, 2008.
- 3D Stuff (9)
- BumpTop (5)
- C/C++ (16)
- Open Source (6)
- Radiant (8)
- Seneca (4)
- Stuff (11)
- Uncategorized (14)
- win32 (11)
- November 10, 2008: Radiant Update
- October 28, 2008: Primary Export: Pain
- September 7, 2008: Results
- September 5, 2008: Multicore Processing And Game Engines
- July 31, 2008: Work++; // Again!
- June 8, 2008: Patterns And Such.
- June 4, 2008: Work++;
- May 20, 2008: SIMD And Randomness
- April 30, 2008: Coder Burn-Out
- March 26, 2008: Some GameDev Math Resources.
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 »