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. Memory Leakage !!!!

Memory Leakage !!!!

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studioperformancehelp
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.
  • C Offline
    C Offline
    Chintan
    wrote on last edited by
    #1

    Sir....I am facing one serious problem of memory leakage. I have developed one dialog based application. In that I have made one class named "CListener" derived from CWinThread. In the InitInstance() function of that class, I have added functionality which I want to perform in separate thread. From the dialog class's OnInitDialog() function I have made the following function call to run the thread. AfxBeginThread(RUNTIME_CLASS(CListener)); All are working fine.....But when I close application Visual C++ IDE show me some memory leackage..... Whould you please show me the way to escap from this problem.... C.R.Naik

    R 1 Reply Last reply
    0
    • C Chintan

      Sir....I am facing one serious problem of memory leakage. I have developed one dialog based application. In that I have made one class named "CListener" derived from CWinThread. In the InitInstance() function of that class, I have added functionality which I want to perform in separate thread. From the dialog class's OnInitDialog() function I have made the following function call to run the thread. AfxBeginThread(RUNTIME_CLASS(CListener)); All are working fine.....But when I close application Visual C++ IDE show me some memory leackage..... Whould you please show me the way to escap from this problem.... C.R.Naik

      R Offline
      R Offline
      RobJones
      wrote on last edited by
      #2

      How are you closing the thread? If you start the thread and close the app while the thread is still running you will get a memory leak.. In UI Threads I try to have the thread terminate it's self.. with a PostQuitMessage(0). Rob

      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