| @@ -40,8 +40,10 @@ public: | |||||
| ~DictData() | ~DictData() | ||||
| { | { | ||||
| #if !FINAL_RELEASE | |||||
| if (nentities) | if (nentities) | ||||
| fprintf(stderr, "ERROR: still %i entities in dict\n", nentities); | fprintf(stderr, "ERROR: still %i entities in dict\n", nentities); | ||||
| #endif | |||||
| free(entities); | free(entities); | ||||
| } | } | ||||
| @@ -103,8 +105,15 @@ int Dict::MakeSlot(char const *name) | |||||
| void Dict::RemoveSlot(int id) | void Dict::RemoveSlot(int id) | ||||
| { | { | ||||
| if (Ticker::Unref(data->entities[id]) == 0) | if (Ticker::Unref(data->entities[id]) == 0) | ||||
| { | |||||
| data->entities[id] = NULL; | data->entities[id] = NULL; | ||||
| data->nentities--; | |||||
| if (data->nentities) | |||||
| data->nentities--; | |||||
| #if !FINAL_RELEASE | |||||
| else | |||||
| fprintf(stderr, "ERROR: removing entity from empty dict\n"); | |||||
| #endif | |||||
| } | |||||
| } | } | ||||