celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Parker (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CELIX-219) Memory Leaks
Date Tue, 10 Feb 2015 22:19:11 GMT
Daniel Parker created CELIX-219:

             Summary: Memory Leaks
                 Key: CELIX-219
                 URL: https://issues.apache.org/jira/browse/CELIX-219
             Project: Celix
          Issue Type: Bug
            Reporter: Daniel Parker
            Priority: Minor

   framework_create() allocates memory for logger, but framework_destroy does not free() it.
   framework_destroy() when destroying framework->installedBundleMap should set the second
argument to true in order to free the memory allocated for the keys.
   framework_destroy() should destroy the mutexes/conditions created by framework_create().
   framework_loadLibrary() should clear the entire libraryPath string before using it.
   fw_uninstallBundle() should only call fw_stopBundle() if the bundle is in the OSGI_FRAMEWORK_BUNDLE_ACTIVE
   The proxy/endpoint bundles get uninstalled correctly, but the normal bundles do not get
uninstalled.  This might be resolved by letting framework_shutdown() call fw_uninstallBundle()
for every bundle (except for the system framework bundle) in the installedBundleMap after
it's done stopping all of the bundles.  Alternately, the bundles could be uninstalled in framework_destroy(),
but fw_uninstallBundle() (and bundle_uninstall() ) wouldn't work at this point because the
dispatcherThread would already have been canceled.

   The function bundle_addModule() does not have a corresponding bundle_removeModule().  This
is because modules are added one at a time but removed all at once.  However, the code which
remove the modules in bundle_destroy() needs to call resolver_removeModule() in order for
this to work properly.
   The function bundle_isUsed() looks incorrect/incomplete in how it uses module_getDependents().
 However, the function isn't actually used so it's probably easier to just remove it than
to try to fix it.
   bundle_closeModules() looks like it should be calling module_destroy() rather than module_setWires().
 And it looks like it should call arrayList_clear(bundle->modules) when it's done.

   m_modules is created but never destroyed.  Perhaps it could be destroyed whenever it's
   m_unresolvedServices/m_resolvedServices are never destroyed and none of the elements added
to them are ever destroyed either.  Perhaps each element should be destroyed if they become
empty and m_unresolvedServices/m_resolvedServices should be destroyed once it contains no

This message was sent by Atlassian JIRA

View raw message