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#
  4. Thread not releasing resources?

Thread not releasing resources?

Scheduled Pinned Locked Moved C#
graphicshelpquestion
1 Posts 1 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.
  • G Offline
    G Offline
    GISnet
    wrote on last edited by
    #1

    I am using the TaskbarNotifier class to display incoming TCP/IP messages. I listen for a message on a port and when one is received, I start a thread that creates a new TaskbarNotifier object and shows the message. However, looking at Windows' Task Manager, I've noticed that the GDI Objects continue to grow (by 2 objects each time I am notified), even though the thread appears to end successfully (the thread count in task manager remains a constant 4). If I call create TaskbarNotifier in the same thread as my TCP/IP listener, the resources don't grow, but the port is blocked until the notifier finishes. Calling the thread without creading a TaskbarNotifier object also does not create growing resources. Adding the single line: TaskbarNotifier taskbarNotifier1 = new TaskbarNotifier(); to the thread class will cause the problem. If i set taskbarNotifier1 = null, it has no effect. Any ideas welcome.

    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