BTreeData::~BTreeData ()
{
+ if (clave)
+ delete clave;
}
uint BTreeData::Size () const
{
uchar *out = new uchar[Size()];
if (clave) {
- memcpy (out, clave->ToArray (), clave->Size ());
+ uchar *n = clave->ToArray ();
+ memcpy (out, n, clave->Size ());
memcpy (out+clave->Size (), &hijo, sizeof (uint));
+ delete [] n;
} else
memcpy (out, &hijo, sizeof (uint));
return out;