Menu

--help & Custom Output leads to Heap Leak

Help
Chris
2007-02-16
2013-05-28
  • Chris

    Chris - 2007-02-16

    I get a Heap Leak every time that I use the --help switch or usage information is posted. If valid arguments are used, then there is no leak and everything runs fine. Also, I cannot create my own class to override version, failure, and usage messages as it always leads to a heap leak. I'm not sure what to do about this.

     
    • Chris

      Chris - 2007-02-16

      I found that this is happening when I call the isSet() method to test for which arguments were set due to using the xorAdd method. The weird part is that it detects the leak at this method call only when an invalid argument or --help or the like is specified. This occurs whether or not I specify my own output object.

      If i specify my own output object and give it valid parameters, then a heap leak is detected on exit of the program.

       
    • Daniel Aarno

      Daniel Aarno - 2007-02-17
       

Log in to post a comment.