CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Threaded View

  1. #13
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Memory Leak within worker thread

    Quote Originally Posted by 99bobster99 View Post
    There are "weird" memory leaks that happen within C++. i.e.
    The only memory leaks are ones introduced by the programmer.
    why do you have to assign a (LPCTSTR) in front of another CString when copying into another CString??
    Show us where you need to do that. Wait, there is no need to, since there is no such thing as you describe-- a CString has an overloaded operator = that takes a CString reference, so your claim is impossible.
    Where are all these "rules" written for C++?
    You are confusing badly written code with what you think is a problem with the language. The rules of C++ are developed by the ANSI/ISO committee. If you want a copy of them, you can get the PDF version from them for 18-20 US dollars. It is over 700 pages, describing within it what is defined, undefined, and implementation-defined behaviour.

    Secondly, what you have written uses proprietary classes such as CString and threading functions -- these are not spoken of at all in the rules of C++. The only thing that is spoken of is whatever classes you write or use, the code follows the basic C++ rules, otherwise behaviour is undefined/implementation-defined.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; June 13th, 2010 at 06:55 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured