Results 1 to 4 of 4

Thread: GetOpenFileName memory leak?

  1. #1

    Thread Starter
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    Question GetOpenFileName memory leak?

    I've been using the GetOpenFileName function from comdlg32.dll and I've noticed that the size of my app in memory jump about 2 MB after making the call.

    This memory never seems to be released. Is there any reason why my app doesn't release the memory?

    I've noticed the same things when using the common dialog control instead of the API function. But, it somehow made more sense to me then because I assumed that the control wasn't releasing the memory

    Any ideas?
    -scott
    he he he

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    The memory usage of your app has increased because it is using the comdlg32.dll and it has to be read into memory. If you use the AX control then your app will still use the dll and as a 'bonus' it will use the ocx file.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Megatron
    Guest
    If you are loading it via LoadLibrary, then you can free it with FreeLibrary.

  4. #4

    Thread Starter
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    thanks...

    That makes sense.
    Thanks!
    -scott
    he he he

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width