ros / pluginlib

Library for loading/unloading plugins in ROS packages during runtime
http://ros.org/wiki/pluginlib
57 stars 101 forks source link

Expose on-demand library load/unload in class loader constructor. #235

Open remod opened 2 years ago

remod commented 2 years ago

Currently, on-demand library loading/unloading is hard-coded to false. This leads to the fact that libraries are unloaded on destruction of the ClassLoader instance, which can throw exceptions (see https://github.com/ros/pluginlib/pull/234).

In my use case I'd like to unload the libraries on-demand, so I do not have to deal with exceptions when the destructor of the ClassLoader instance is called.

This PR exposes the setting in the ClassLoader constructor. The default value is false for backwards compatibility.

remod commented 2 years ago

@nuclearsandwich kind ping