Please remove from CCAccelerometer::CCAccelerometer\ the\ following\ funny\ code\ \
163\ delete\ m_spCCAccelerometer\ ;
164\ m_spCCAccelerometer\ =\ NULL;
Because\ it\ is\ a\ crash.\ Besides\ CCAccelerometer\ is\ never\ destroyed,\ but\ on\ win32\ the\ object\ is\ created\ in\ heap.\ So\ it\ is\ leak.\ I\ suggest\ to\ add\ static\ function\
\ delete\ m_spCCAccelerometer;
\ m_spCCAccelerometer\ =\ NULL;
and\ call\ it\ inCCDirector().
I’m using methodic when all heap objects should be removed after your app delegate is removed. On win32 it helps to continuously control memory leaks with CRTDBG: on the end of main() fuction after deleting the app delegate I call _CrtDumpMemoryLeaks() which dumps all unrelieved heap memory. You see the log after every stop of your app. And if you see leak, you can fix it just after it appear, but not at the end of development process when your app ready.