[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

This looks strange...

Found this code fragment in tofux.cxx:

	void Heaper::operator delete (void* p)
	  if (!FLUID_VAR(objectHeap)) {
	  Heap * owner;
	  if (owner = ownerOf(p)) {
	    owner->free (p);
	  } else {
	    ::operator delete(p);

As I read it, it complains if the objectHeap FLUID_VARIABLE is unbound
when operator delete is called.  What's wrong with that?  Seems to me
it's entirely reasonable for the var to have become unbound by the time
an object is to be deleted.

(If this is complaining about something happening too soon in
initialization, or the failure to execute the default binding,
the error message should be changed.)