size optimization
it's official. even msdn now says SHGetMalloc returns the same allocator CoTaskMemFree uses and a little debugging backs this even on Windows 95 git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4978 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
08650c9384
commit
6ea14b45da
3 changed files with 2 additions and 14 deletions
|
@ -951,7 +951,7 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
if (idlist)
|
||||
{
|
||||
// free idlist
|
||||
FreePIDL(idlist);
|
||||
CoTaskMemFree(idlist);
|
||||
|
||||
addtrailingslash(dir);
|
||||
|
||||
|
|
|
@ -49,17 +49,6 @@ NSIS_STRING g_usrvars[1] __attribute__((section (NSIS_VARS_SECTION)));
|
|||
# endif
|
||||
#endif
|
||||
|
||||
void NSISCALL FreePIDL(LPITEMIDLIST idl)
|
||||
{
|
||||
IMalloc *m;
|
||||
SHGetMalloc(&m);
|
||||
if (m)
|
||||
{
|
||||
m->lpVtbl->Free(m, idl);
|
||||
m->lpVtbl->Release(m);
|
||||
}
|
||||
}
|
||||
|
||||
HANDLE NSISCALL myCreateProcess(char *cmd, char *dir)
|
||||
{
|
||||
DWORD d;
|
||||
|
@ -627,7 +616,7 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
|||
if (!SHGetSpecialFolderLocation(g_hwnd, fldrs[x], &idl))
|
||||
{
|
||||
BOOL res = SHGetPathFromIDList(idl, out);
|
||||
FreePIDL(idl);
|
||||
CoTaskMemFree(idl);
|
||||
if (res)
|
||||
{
|
||||
break;
|
||||
|
|
|
@ -32,7 +32,6 @@ char * NSISCALL mystrcat(char *out, const char *concat);
|
|||
char * NSISCALL mystrstr(char *a, char *b);
|
||||
WIN32_FIND_DATA * NSISCALL file_exists(char *buf);
|
||||
char * NSISCALL my_GetTempFileName(char *buf, const char *dir);
|
||||
void NSISCALL FreePIDL(LPITEMIDLIST idl);
|
||||
|
||||
//BOOL NSISCALL my_SetWindowText(HWND hWnd, const char *val);
|
||||
#define my_SetWindowText SetWindowText
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue