comparison gen/configfile.cpp @ 1475:1f29cbc36bf5

Fix memory leak in configfile.cpp...probably the only one in ldc!
author Kelly Wilson <wilsonk cpsc.ucalgary.ca>
date Thu, 04 Jun 2009 16:46:05 -0600
parents 8309ebaa23d5
children df0ffca8a636
comparison
equal deleted inserted replaced
1474:39f4b01e2008 1475:1f29cbc36bf5
56 if (!p.exists()) 56 if (!p.exists())
57 { 57 {
58 #if _WIN32 58 #if _WIN32
59 char buf[256]; 59 char buf[256];
60 GetModuleFileName(NULL, buf, 256); 60 GetModuleFileName(NULL, buf, 256);
61 p = *(new std::string(buf)); 61 p = buf;
62 #else 62 #else
63 // 4) try next to the executable 63 // 4) try next to the executable
64 p = sys::Path::GetMainExecutable(argv0, mainAddr); 64 p = sys::Path::GetMainExecutable(argv0, mainAddr);
65 #endif 65 #endif
66 p.eraseComponent(); 66 p.eraseComponent();