celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject svn commit: r1647388 - in /celix/trunk/framework/private: include/bundle_cache.h src/bundle_cache.c src/framework.c
Date Mon, 22 Dec 2014 19:36:26 GMT
Author: bpetri
Date: Mon Dec 22 19:36:26 2014
New Revision: 1647388

URL: http://svn.apache.org/r1647388
Log:

bundleCach free during framework shutdown added


Modified:
    celix/trunk/framework/private/include/bundle_cache.h
    celix/trunk/framework/private/src/bundle_cache.c
    celix/trunk/framework/private/src/framework.c

Modified: celix/trunk/framework/private/include/bundle_cache.h
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/include/bundle_cache.h?rev=1647388&r1=1647387&r2=1647388&view=diff
==============================================================================
--- celix/trunk/framework/private/include/bundle_cache.h (original)
+++ celix/trunk/framework/private/include/bundle_cache.h Mon Dec 22 19:36:26 2014
@@ -57,6 +57,15 @@ typedef struct bundleCache *bundle_cache
 celix_status_t bundleCache_create(properties_pt configurationMap, framework_logger_pt logger,
bundle_cache_pt *bundle_cache);
 
 /**
+ * Frees the bundle_cache memory allocated in bundleCache_create
+ *
+ * @param bundle_cache Output parameter for the created cache
+ * @return Status code indication failure or success:
+ *      - CELIX_SUCCESS when no errors are encountered.
+ */
+celix_status_t bundleCache_destroy(bundle_cache_pt *cache);
+
+/**
  * Recreates and retrieves the list of archives for the given bundle cache.
  * Archives are recreated on the bundle cache memory pool, the list for the results is created
on the suplied pool, and is owned by the caller.
  *

Modified: celix/trunk/framework/private/src/bundle_cache.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/bundle_cache.c?rev=1647388&r1=1647387&r2=1647388&view=diff
==============================================================================
--- celix/trunk/framework/private/src/bundle_cache.c (original)
+++ celix/trunk/framework/private/src/bundle_cache.c Mon Dec 22 19:36:26 2014
@@ -67,6 +67,10 @@ celix_status_t bundleCache_create(proper
 }
 
 celix_status_t bundleCache_destroy(bundle_cache_pt *cache) {
+
+    free(*cache);
+    *cache = NULL;
+
     return CELIX_SUCCESS;
 }
 

Modified: celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/framework.c?rev=1647388&r1=1647387&r2=1647388&view=diff
==============================================================================
--- celix/trunk/framework/private/src/framework.c (original)
+++ celix/trunk/framework/private/src/framework.c Mon Dec 22 19:36:26 2014
@@ -273,6 +273,8 @@ celix_status_t framework_destroy(framewo
 		hashMap_destroy(framework->installedBundleMap, true, false);
 	}
 
+	bundleCache_destroy(&framework->cache);
+
 	unsetenv(OSGI_FRAMEWORK_FRAMEWORK_UUID);
 	free(framework);
 



Mime
View raw message