Operator new[] should always be matched by operator delete[],

even when allocating POD types.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33488 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-02-17 19:33:52 +00:00
parent 6490dd8636
commit 4c92ec8383

View File

@ -112,7 +112,7 @@ string convert_path_list(string const & p, PathStyle const & target)
char * ptr = new char[size];
if (ptr && cygwin_conv_path_list(target, pc, ptr, size) == 0) {
string const path_list = subst(ptr, '\\', '/');
delete ptr;
delete [] ptr;
return path_list;
} else
lyxerr << "LyX: Cannot convert path list: " << p << endl;
@ -178,7 +178,7 @@ string convert_path_list(string const & p, PathStyle const & target)
cygwin_posix_to_win32_path_list(pc, ptr);
string path_list = subst(ptr, '\\', '/');
delete ptr;
delete [] ptr;
return path_list;
}
}