Skip to content

Fix memory leak: meta objects not destroyed #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: noetic-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ install(TARGETS ${PROJECT_NAME}
install(DIRECTORY include/class_loader/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(PROGRAMS scripts/class_loader_headers_update.py
catkin_install_python(PROGRAMS scripts/class_loader_headers_update.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

if(CATKIN_ENABLE_TESTING)
Expand Down
2 changes: 1 addition & 1 deletion include/class_loader/class_loader_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void registerPlugin(const std::string & class_name, const std::string & base_cla
if (factoryMap.find(class_name) != factoryMap.end()) {
CONSOLE_BRIDGE_logWarn(
"class_loader.impl: SEVERE WARNING!!! "
"A namespace collision has occured with plugin factory for class %s. "
"A namespace collision has occurred with plugin factory for class %s. "
"New factory will OVERWRITE existing one. "
"This situation occurs when libraries containing plugins are directly linked against an "
"executable (the one running right now generating this message). "
Expand Down
4 changes: 3 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
<description>
The class_loader package is a ROS-independent package for loading plugins during runtime and the foundation of the higher level ROS "pluginlib" library. class_loader utilizes the host operating system's runtime loader to open runtime libraries (e.g. .so/.dll files), introspect the library for exported plugin classes, and allows users to instantiate objects of said exported classes without the explicit declaration (i.e. header file) for those classes.
</description>
<maintainer email="stevenragnarok@osrfoundation.org">Steven! Ragnarök</maintainer>
<maintainer email="michael@openrobotics.org">Michael Carroll</maintainer>
<maintainer email="geoff@openrobotics.org">Geoffrey Biggs</maintainer>
<license>BSD</license>

<url type="website">http://ros.org/wiki/class_loader</url>
<url type="bugtracker">https://github.com/ros/class_loader/issues</url>
<url type="repository">https://github.com/ros/class_loader</url>

<author>Mirza Shah</author>
<author email="stevenragnarok@openrobotics.org">Steven! Ragnarök</author>

<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>

Expand Down
1 change: 1 addition & 0 deletions src/class_loader_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ void unloadLibrary(const std::string & library_path, ClassLoader * loader)
assert(library->isLoaded() == false);
delete (library);
itr = open_libraries.erase(itr);
purgeGraveyardOfMetaobjects(library_path, loader, true);
} else {
CONSOLE_BRIDGE_logDebug(
"class_loader.impl: "
Expand Down