Hi,

Has anyone come out the right solution for Property Manager memory leak? If
there is, please tell me!

Thanks!

Chengbi


-----Original Message-----
From: Richard Kiš [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 3:58 AM
To: [EMAIL PROTECTED]
Subject: [Flightgear-devel] Property managersmMemory leaks


Hi,

I have found the SGPropertyNode class causes the memory leaks caused by not
deleted pointer fields. I have added this deletion to following destructors
in the Props.cxx:

SGPropertyNode::hash_table::bucket::~bucket ()
{
  for (int i = 0; i < _length; i++)
    delete _entries[i];

  //pointer field deletion added
  delete _entries;
}


SGPropertyNode::hash_table::~hash_table ()
{
  for (unsigned int i = 0; i < _data_length; i++)  
    delete _data[i];

  //pointer field deletion added
  delete _data;
  
}

Could somebody to check this in to the CVS?


Richard

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to