Ticket #846: CJSObject_memleak_fixes.patch
File CJSObject_memleak_fixes.patch, 4.7 KB (added by , 11 years ago) |
---|
-
source/graphics/GameView.cpp
205 205 { 206 206 } 207 207 208 ~CGameViewImpl(); 209 208 210 CGame* Game; 209 211 CColladaManager ColladaManager; 210 212 CMeshManager MeshManager; … … 412 414 CJSObject<CGameViewImpl>::ScriptingInit("GameView"); 413 415 } 414 416 417 CGameViewImpl::~CGameViewImpl() 418 { 419 CJSObject<CGameViewImpl>::ScriptingShutdown(); 420 } 421 415 422 int CGameView::Initialize() 416 423 { 417 424 CFG_GET_VAL("view.scroll.speed", Float, m->ViewScrollSpeed); -
source/renderer/Renderer.cpp
501 501 { 502 502 UnregisterFileReloadFunc(ReloadChangedFileCB, this); 503 503 504 CJSObject<CRenderer>::ScriptingShutdown(); 505 504 506 // we no longer UnloadAlphaMaps / UnloadWaterTextures here - 505 507 // that is the responsibility of the module that asked for 506 508 // them to be loaded (i.e. CGameView). -
source/scripting/ScriptableObject.h
249 249 g_ScriptingHost.DefineCustomObjectType( &JSI_class, Constructor, ConstructorMinArgs, JSI_props, JSI_methods, NULL, NULL ); 250 250 251 251 delete[]( JSI_methods ); 252 253 atexit( ScriptingShutdown );254 252 } 255 253 static void ScriptingShutdown() 256 254 { -
source/soundmanager/js/AmbientSound.cpp
32 32 { 33 33 } 34 34 35 JAmbientSound::~JAmbientSound() 36 { 37 CJSObject<JAmbientSound>::ScriptingShutdown(); 38 } 39 35 40 // start playing the sound, all ambient sounds loop 36 41 bool JAmbientSound::Play(JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv)) 37 42 { -
source/soundmanager/js/AmbientSound.h
25 25 { 26 26 public: 27 27 JAmbientSound(const VfsPath& pathname); 28 ~JAmbientSound(); 28 29 29 30 CStr ToString(JSContext* cx, uintN argc, jsval* argv); 30 31 -
source/soundmanager/js/MusicList.cpp
38 38 #endif 39 39 } 40 40 41 JMusicList::~JMusicList() 42 { 43 CJSObject<JMusicList>::ScriptingShutdown(); 44 } 45 41 46 bool JMusicList::AddItem(JSContext* cx, uintN UNUSED(argc), jsval* vp) 42 47 { 43 48 CStrW filename; -
source/soundmanager/js/MusicList.h
39 39 { 40 40 public: 41 41 JMusicList(); 42 ~JMusicList(); 42 43 43 44 // Script-bound functions 44 45 -
source/soundmanager/js/MusicSound.cpp
33 33 { 34 34 } 35 35 36 JMusicSound::~JMusicSound() 37 { 38 CJSObject<JMusicSound>::ScriptingShutdown(); 39 } 40 36 41 bool JMusicSound::Play(JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv)) 37 42 { 38 43 #if CONFIG2_AUDIO -
source/soundmanager/js/MusicSound.h
39 39 { 40 40 public: 41 41 JMusicSound(const VfsPath& pathname); 42 ~JMusicSound(); 42 43 43 44 // Script-bound functions 44 45 -
source/soundmanager/js/Sound.cpp
46 46 m_SndItem = 0; 47 47 } 48 48 #endif // CONFIG2_AUDIO 49 50 CJSObject<JSound>::ScriptingShutdown(); 49 51 } 50 52 51 53 bool JSound::ClearSoundItem() -
source/soundmanager/js/SoundPlayer.cpp
33 33 34 34 JSoundPlayer::~JSoundPlayer() 35 35 { 36 CJSObject<JSoundPlayer>::ScriptingShutdown(); 36 37 } 37 38 38 39 bool JSoundPlayer::StartMusic(JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv))