Jump to content

Recommended Posts

Posted

I found out about the CreateThread mem leak and am switching the code to use _beginthreadex instead. However, the function is not recognized in Visual Studio. I do have the code generation set to multi-threaded. Does anyone know why this would still be happening?

post-1-0-20326600-1358926945_thumb.png

Let's build cool stuff and have fun. :)

Posted

It already uses pthreads for everything but Windows. What do they do, make a wrapper around the Windows thread functions?

 

On Windows, you have three thread creation functions:

  • CreateThread
  • _beginthread
  • _beginthreadex

 

And I guess the first two produce memory leaks with C++. ohmy.png Fortunately, you can slip _beginthreadex in easily and if you designed your threads around CreateThread, it still works the same. rolleyes.gif

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...