Fixed a couple of memory leak...

This commit is contained in:
Federico Ponchio 2004-12-04 13:24:28 +00:00
parent 7a4c85a7dc
commit 315340fd9b
2 changed files with 18 additions and 0 deletions

View File

@ -24,6 +24,9 @@
History
$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 nxs;
VPartition::~VPartition() {
if(bd) delete bd;
}
void VPartition::Init() {
if(bd) delete bd;
buffer.resize(size() * 3);

View File

@ -24,6 +24,9 @@
History
$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> {
public:
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();
int Locate(const vcg::Point3f &p);