Fixed a couple of memory leak...
This commit is contained in:
parent
7a4c85a7dc
commit
315340fd9b
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.1 2004/11/30 22:50:30 ponchio
|
||||||
|
Level 0.
|
||||||
|
|
||||||
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
@ -36,6 +39,10 @@ using namespace std;
|
||||||
using namespace vcg;
|
using namespace vcg;
|
||||||
using namespace nxs;
|
using namespace nxs;
|
||||||
|
|
||||||
|
VPartition::~VPartition() {
|
||||||
|
if(bd) delete bd;
|
||||||
|
}
|
||||||
|
|
||||||
void VPartition::Init() {
|
void VPartition::Init() {
|
||||||
if(bd) delete bd;
|
if(bd) delete bd;
|
||||||
buffer.resize(size() * 3);
|
buffer.resize(size() * 3);
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.1 2004/11/30 22:50:30 ponchio
|
||||||
|
Level 0.
|
||||||
|
|
||||||
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
@ -47,6 +50,14 @@ namespace nxs {
|
||||||
class VPartition: public std::vector<vcg::Point3f> {
|
class VPartition: public std::vector<vcg::Point3f> {
|
||||||
public:
|
public:
|
||||||
VPartition(): bd(NULL) {}
|
VPartition(): bd(NULL) {}
|
||||||
|
~VPartition();
|
||||||
|
private:
|
||||||
|
VPartition &operator=(const VPartition &part) {
|
||||||
|
for(unsigned int i = 0; i < part.size(); i++)
|
||||||
|
push_back(part[i]);
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
public:
|
||||||
void Init();
|
void Init();
|
||||||
int Locate(const vcg::Point3f &p);
|
int Locate(const vcg::Point3f &p);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue