mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-11 05:04:41 -04:00
Recommit because something is strange. The changes are that memory allocated in _construct is deallocated when the CmdLine obj is destroyed
This commit is contained in:
parent
6c06e31bb2
commit
4362a50705
@ -93,6 +93,9 @@ class CmdLine
|
|||||||
*/
|
*/
|
||||||
XorHandler _xorHandler;
|
XorHandler _xorHandler;
|
||||||
|
|
||||||
|
std::list<Arg*> _argDeleteOnExitList;
|
||||||
|
std::list<Visitor*> _visitorDeleteOnExitList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether a name/flag string matches entirely matches
|
* Checks whether a name/flag string matches entirely matches
|
||||||
* the Arg::blankChar. Used when multiple switches are combined
|
* the Arg::blankChar. Used when multiple switches are combined
|
||||||
@ -122,6 +125,16 @@ class CmdLine
|
|||||||
*/
|
*/
|
||||||
void _constructor();
|
void _constructor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a delete ptr; operation on ptr when this object is deleted.
|
||||||
|
*/
|
||||||
|
void deleteOnExit(Arg* ptr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a delete ptr; operation on ptr when this object is deleted.
|
||||||
|
*/
|
||||||
|
void deleteOnExit(Visitor* ptr);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -152,6 +165,9 @@ class CmdLine
|
|||||||
const char delimiter = ' ',
|
const char delimiter = ' ',
|
||||||
const std::string& version = "none" );
|
const std::string& version = "none" );
|
||||||
|
|
||||||
|
///Deletes any resources allocated by a CmdLine object
|
||||||
|
~CmdLine();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an argument to the list of arguments to be parsed.
|
* Adds an argument to the list of arguments to be parsed.
|
||||||
* \param a - Argument to be added.
|
* \param a - Argument to be added.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user