Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CDialog & Free Memory

CDialog & Free Memory

Scheduled Pinned Locked Moved C / C++ / MFC
helpannouncementperformancequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NMiceli
    wrote on last edited by
    #1

    Hi. My problem is if my program is using 10,000kb then i load a catalog in CDialog OnBnClickedC() { CatDlg dlg; dlg.DoModal(); } memory raises 18,000kb and when i close de dialog it returns to between 12,000 and 13,000kb why? how should i release the dialog? i tried with new and delete with the same results. Please help me. Update: i see that when i load the dialog, a lot of dlls load with it, but all dlls unload only when i exit the application not when i quit the dialog. Why?

    D 1 Reply Last reply
    0
    • N NMiceli

      Hi. My problem is if my program is using 10,000kb then i load a catalog in CDialog OnBnClickedC() { CatDlg dlg; dlg.DoModal(); } memory raises 18,000kb and when i close de dialog it returns to between 12,000 and 13,000kb why? how should i release the dialog? i tried with new and delete with the same results. Please help me. Update: i see that when i load the dialog, a lot of dlls load with it, but all dlls unload only when i exit the application not when i quit the dialog. Why?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Mr. Unknown wrote: how should i release the dialog? There's nothing to release. It's a stack-based object. Read the last section of this article for clarification.


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups