From 0b72cdabfd6cd99461ebdab337213db93487b9ed Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 15 Jul 2014 18:21:01 +0000 Subject: [PATCH] This is basically a revert of r32236. What looked as a good patch turned out to be a nightmare, as the pointers to the classes are located in shared libraries memory areas, and are not accesible after the shared library is unloaded. Thus, OPAL cannot cleanup the left-over classes from the other shared libraries. This commit was SVN r32248. The following SVN revision numbers were found above: r32236 --> open-mpi/ompi@59017433e17e215c405f11276bb6e6c6bba58e73 --- opal/class/opal_object.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/opal/class/opal_object.c b/opal/class/opal_object.c index 0ebd6f301d..24a0713190 100644 --- a/opal/class/opal_object.c +++ b/opal/class/opal_object.c @@ -165,20 +165,13 @@ void opal_class_initialize(opal_class_t *cls) */ int opal_class_finalize(void) { - opal_class_t *cls; int i; if (NULL != classes) { for (i = 0; i < num_classes; ++i) { - if (NULL == (cls = classes[i])) continue; - - free(cls->cls_construct_array); - cls->cls_construct_array = NULL; - cls->cls_destruct_array = NULL; - cls->cls_depth = 0; - if( cls != &opal_object_t_class ) - cls->cls_initialized = 0; /* all but the predefined */ - classes[i] = NULL; /* security */ + if (NULL != classes[i]) { + free(classes[i]); + } } free(classes); classes = NULL; @@ -196,7 +189,7 @@ static void save_class(opal_class_t *cls) expand_array(); } - classes[num_classes] = cls; + classes[num_classes] = cls->cls_construct_array; ++num_classes; }