diff --git a/applications/present3D/Cluster.h b/applications/present3D/Cluster.h index c3db10b62..4fb4176b5 100644 --- a/applications/present3D/Cluster.h +++ b/applications/present3D/Cluster.h @@ -172,13 +172,11 @@ class DataConverter _numBytes = numBytes; } - char* _startPtr; - char* _endPtr; - unsigned int _numBytes; - bool _swapBytes; + ~DataConverter() + { + delete [] _startPtr; + } - char* _currentPtr; - void reset() { _currentPtr = _startPtr; @@ -327,6 +325,18 @@ class DataConverter void write(CameraPacket& cameraPacket); void read(CameraPacket& cameraPacket); + + char* startPtr() { return _startPtr; } + unsigned int numBytes() { return _numBytes; } + + protected: + + char* _startPtr; + char* _endPtr; + unsigned int _numBytes; + bool _swapBytes; + + char* _currentPtr; }; diff --git a/applications/present3D/present3D.cpp b/applications/present3D/present3D.cpp index 079f769f2..82f22ca2a 100644 --- a/applications/present3D/present3D.cpp +++ b/applications/present3D/present3D.cpp @@ -918,15 +918,15 @@ int main( int argc, char **argv ) scratchPad.reset(); scratchPad.read(cp); - bc.setBuffer(scratchPad._startPtr, scratchPad._numBytes); + bc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes()); - std::cout << "bc.sync()"<