Skip to content

Commit

Permalink
FIREBREATH-40 added shutdown() command to fbgen template
Browse files Browse the repository at this point in the history
  • Loading branch information
taxilian committed Apr 18, 2011
1 parent 2583cd7 commit 574ba4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fbgen/src/Template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ void @{PLUGIN_ident}::onPluginReady()
// this point.
}

void @{PLUGIN_ident}::shutdown()
{
// This will be called when it is time for the plugin to shut down;
// any threads or anything else that may hold a shared_ptr to this
// object should be released here so that this object can be safely
// destroyed. This is the last point that shared_from_this and weak_ptr
// references to this object will be valid
}

///////////////////////////////////////////////////////////////////////////////
/// @@brief Creates an instance of the JSAPI object that provides your main
/// Javascript interface.
Expand Down
1 change: 1 addition & 0 deletions fbgen/src/Template.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class @{PLUGIN_ident} : public FB::PluginCore

public:
void onPluginReady();
void shutdown();
virtual FB::JSAPIPtr createJSAPI();
// If you want your plugin to always be windowless, set this to true
// If you want your plugin to be optionally windowless based on the
Expand Down

0 comments on commit 574ba4b

Please sign in to comment.