C++ API changes+fixes:

- context is now a pointer to make sure there's only one all the time
- fixed a couple of double free's
- some minor bug fixes
This commit is contained in:
git@daemon.de
2014-08-01 14:46:38 +02:00
parent 1e4e65b811
commit e6a5c51d8a
13 changed files with 168 additions and 114 deletions

View File

@@ -33,15 +33,22 @@
namespace pcp {
class PcpContext {
private:
bool iscopy;
public:
PCPCTX *ptx;
// constructors
PcpContext();
// clean up, wo don't do it in the destructor,
// since it will be called multiple times otherwise
void done();
// destructor
~PcpContext();
// copy constructor. holds the same pointer
// as the original and doesn't free()
PcpContext& operator = (const PcpContext *PTX);
PcpContext(const PcpContext *PTX);
};
};