I may be wrong here so please feel free to correct me and guide me right if you can.
I’m using VS2012 and the latest tip. I have a problem with ScopedPointer in debug builds. Why? Because it’s customary by the CRT to fill deleted Heap memory with 0xfeeefeee as an aid to the developer during debugging.
The problem that occurs frequently for me is in juce_Component.h
in the Component::internalRepaintUnchecked member:
if (cachedImage != nullptr)
The check against nullptr works great in a release build but in my debug build, this is sometimes (how often I don’t know) 0xfeeefeee and hence the code is executed and things crash.
It should be said that I’m using timers at the time; if it matters.
Is there anything that I can do? Perhaps ScopedPointer can return nullptr even when the value of the object is 0xfeeefeee (although that feels like a ugly hack to mee.)