none
C++ GetOpenFileName memory usage

    Question

  • Hi,

    Prepared in the program I need to file name.
    To do this, use Getopenfilename API.
    But there is a small problem.
    I click to select the file and run the program.
    Opens smoothly.
    The problem starts after here.
    After coming to this screen rises over the use of memory.
    Even if I say cancel the program without selecting a file, use memory stays the same.
    Can I leave the free use of this memory.Thanks

     

    Translate : Google

    Tuesday, November 2, 2010 9:50 AM

Answers

  • The GetOpenFilename API will load up a bunch of shell code in order to handle the dialog with all of its functionality. This results in loading multiple DLLs, creating a bunch of threads, and generally sending your memory utilization extremely high.

    Unfortunately it doesn't look like there is a way to reclaim these resources which remain in your process for performance reasons.


    Microsoft Test - http://tester.poleyland.com/
    • Marked as answer by fx55 Tuesday, November 2, 2010 5:10 PM
    Tuesday, November 2, 2010 3:16 PM

All replies

  • The GetOpenFilename API will load up a bunch of shell code in order to handle the dialog with all of its functionality. This results in loading multiple DLLs, creating a bunch of threads, and generally sending your memory utilization extremely high.

    Unfortunately it doesn't look like there is a way to reclaim these resources which remain in your process for performance reasons.


    Microsoft Test - http://tester.poleyland.com/
    • Marked as answer by fx55 Tuesday, November 2, 2010 5:10 PM
    Tuesday, November 2, 2010 3:16 PM
  • Thanks
    Tuesday, November 2, 2010 3:58 PM