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 problem with WorkerThread

Memory problem with WorkerThread

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiodebuggingperformancehelp
3 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

    Hello guys, I am frequently using one WorkerThread in my application. It is starting using AfxBeginThread() function. When I run application from within IDE, debug window is also not showing any memory leake. But when I run this application in Windows NT, its task manager shows memory usage going on increasing by time in chunk of 4 KB. Can anybody show me the way to control this memory wastage. Thanking You, C.R.Naik

    V 1 Reply Last reply
    0
    • C Chintan

      Hello guys, I am frequently using one WorkerThread in my application. It is starting using AfxBeginThread() function. When I run application from within IDE, debug window is also not showing any memory leake. But when I run this application in Windows NT, its task manager shows memory usage going on increasing by time in chunk of 4 KB. Can anybody show me the way to control this memory wastage. Thanking You, C.R.Naik

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      There are several possible reasons. One reason is that the threads do not terminate correctly. Another reason is that the process does not deallocate memory correctly. Kuphryn

      C 1 Reply Last reply
      0
      • V valikac

        There are several possible reasons. One reason is that the threads do not terminate correctly. Another reason is that the process does not deallocate memory correctly. Kuphryn

        C Offline
        C Offline
        Chintan
        wrote on last edited by
        #3

        1. I have used "return 0;" statement to return from thread's controlling function and hence to terminate thread. 2. How can you make sure that the process deallocates memory correctly ? Thanking You C.R.Naik

        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