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

Threaded View

  1. #16
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: memory leak in my memset usage?

    Quote Originally Posted by lab1 View Post
    Code:
    #include <winsohck2.h>
    #pragma comment(lib,"ws2_32.lib")
    
    int main()
    {
    	WSADATA wsaData = {0};
    	WSAStartup(MAKEWORD(2, 2), &wsaData);
    	int _socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); 
    	closesocket(_socket);
    	WSACleanup();
    }
    There is no memory leaks in this code.
    The "scan the heap for memory leaks" doesn't matter until the main() returns.
    Last edited by VictorN; February 20th, 2009 at 03:40 PM.
    Victor Nijegorodov

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