Memory leask in STLPort
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Memory leask in STLPort

  1. #1
    Join Date
    Apr 2009
    Posts
    6

    Memory leask in STLPort

    Hi,

    I am writing one cisco CTIOS aaplication. I am using STLPort in that aaplication. In my code I am getting too many memory leaks in below line.

    std::string s = rArguments.DumpArgs();

    When I am using the above line in my piece of code in TaskManager it is showing too many handles. After two to three days of my application start, it is getting crashed. If I commented this line I am able to run the application for more days.

    this std::string is referring to stlport files.

    Please can anyone help me on this issue ASAP.


    Suraani.

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,266

    Re: Memory leask in STLPort

    What makes you so sure that the problem does not lie with rArguments.DumpArgs()?
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Apr 2009
    Posts
    6

    Re: Memory leask in STLPort

    This rArguments:umpArgs() simply print the arguments in to one text file. I am not allocating any memory for that.

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,266

    Re: Memory leask in STLPort

    Quote Originally Posted by suraani
    This rArguments::DumpArgs() simply print the arguments in to one text file. I am not allocating any memory for that.
    You probably are allocating memory, but perhaps not manually, and memory is not the only resource. Show the definition of the DumpArgs() member function, along with the relevant parts of the class definition.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  5. #5
    Join Date
    Apr 2009
    Posts
    6

    Re: Memory leask in STLPort

    Actually this function is defined in CTIOS libraries. Here I am attaching that header file. I am using this function only in one place.
    Attached Files Attached Files

  6. #6
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,266

    Re: Memory leask in STLPort

    Quote Originally Posted by suraani
    Actually this function is defined in CTIOS libraries.
    Right, so you are caught between a standard library implementation and a domain specific library. A quick search brings up STLport string 'leaking'. If the suggestion does not solve your problem then you might want to either switch to a different standard library implementation, or request for help from the STLport implementers.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center