I make a lauchbar but my program use 4.6mo in memory
I search a solution to reduce the memory used.
And I find the function SHGETFILEINFO use 2.5 mo 8O
See this code, I write the meory used after all functions
Code: Select all
Procedure.l ExtractLargeIconFile2(IconPath.s) ; Extraire l'icône 32*32 d'un fichier
; Cette procedure permet d'extraire l'ID de l'icône 32*32 associé au type de fichier ou au dossier dont l'adresse est IconPath
hImageList = SHGetFileInfo_(IconPath, 0, @InfosFile.SHFILEINFO, SizeOf(SHFILEINFO), #SHGFI_SYSICONINDEX | #SHGFI_ICON | #SHGFI_LARGEICON)
; hImageList est le handle de l'ImageList
ProcedureReturn InfosFile\hIcon
EndProcedure
OpenWindow(0, 0, 0, 100, 100, #PB_Window_ScreenCentered | #PB_Window_SystemMenu, "Test") ; 1364
CreateGadgetList(WindowID()) ; 1376
Icone = ExtractLargeIconFile2("c:\") ; 3944 (+2568 Arg)
ImageGadget(0, 0, 0, 32, 32, Icone) ; 3984
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindowI think the 2.5 mo was the ImageList but when I use ImageList_Destroy, there are no result.
Thanks for your help

