+2000-10-13 Mo DeJong <mdejong@redhat.com>
+
+ * itcl/generic/itcl_objects.c (Itcl_CreateObject):
+ Add code to check for an object that deletes itself
+ inside its own constructor. We need to avoid adding
+ this object to the global object list.
+
2000-06-22 Syd Polk <spolk@redhat.com>
* itcl/win/Makefile.in: Added target install-shared-libraries.
newObj->constructed = NULL;
/*
- * Add it to the list of all known objects.
+ * Add it to the list of all known objects. The only
+ * tricky thing to watch out for is the case where the
+ * object deleted itself inside its own constructor.
+ * In that case, we don't want to add the object to
+ * the list of valid objects. We can determine that
+ * the object deleted itself by checking to see if its
+ * accessCmd member is NULL.
*/
- if (result == TCL_OK) {
+ if ((result == TCL_OK) && (newObj->accessCmd != NULL)) {
entry = Tcl_CreateHashEntry(&cdefnPtr->info->objects,
(char*)newObj->accessCmd, &newEntry);