Commit 60e65836 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[DOC] - added a note to WModule denoting the problem of the need to return a...

[DOC] - added a note to WModule denoting the problem of the need to return a shared_ptr type in WModuleLoader.
parent bfd43a4f
......@@ -591,7 +591,10 @@ private:
};
/**
* The following macro is used by modules so the factory can aquire a prototype instance from a shared library using the symbol.
* The following macro is used by modules so the factory can acquire a prototype instance from a shared library using the symbol.
*
* \note we need the module instance to be created using a shared_ptr as WModule is derived from enable_shared_from_this. Removing the shared
* pointer causes segmentation faults during load.
*/
#define W_LOADABLE_MODULE( MODULECLASS ) \
extern "C" boost::shared_ptr< WModule > WLoadModule() { return boost::shared_ptr< WModule >( new MODULECLASS ); } // NOLINT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment