Remove Class_Destroy implementation

It wasn't needed for thread safety after all.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/5646ae7c
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/5646ae7c
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/5646ae7c

Branch: refs/heads/master
Commit: 5646ae7c88a9c5c24e017d48fbed97128aba9021
Parents: 68e5574
Author: Nick Wellnhofer <[email protected]>
Authored: Wed May 11 12:09:16 2016 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Sun May 15 17:57:34 2016 +0200

----------------------------------------------------------------------
 runtime/core/Clownfish/Class.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5646ae7c/runtime/core/Clownfish/Class.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Class.c b/runtime/core/Clownfish/Class.c
index 4608866..c5bbd34 100644
--- a/runtime/core/Clownfish/Class.c
+++ b/runtime/core/Clownfish/Class.c
@@ -242,16 +242,7 @@ Class_bootstrap(const cfish_ParcelSpec *parcel_spec) {
 
 void
 Class_Destroy_IMP(Class *self) {
-    for (size_t i = 0; self->methods[i]; i++) {
-        // Call Destroy directly instead of going through DECREF.
-        Method_Destroy(self->methods[i]);
-    }
-    FREEMEM(self->methods);
-
-    DECREF(self->name);
-    DECREF(self->name_internal);
-
-    SUPER_DESTROY(self, CLASS);
+    THROW(ERR, "Insane attempt to destroy Class for class '%o'", self->name);
 }
 
 void

Reply via email to