Skip to content

Commit

Permalink
Add note about static initialization of C++ classes
Browse files Browse the repository at this point in the history
  • Loading branch information
elextr authored and codebrainz committed Apr 1, 2012
1 parent bcb6911 commit 5f341e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vol_5/newsletter_5.rst
Expand Up @@ -116,6 +116,12 @@ to C++::
dialogs_show_msgbox(GTK_MESSAGE_INFO, "%s", hello_message);
}

It's important to note that the dynamic library loading mechanism that loads
plugins is C functionality and does not know about C++ constructors. This means
that global and static objects in the plugin will *not* have their constructors
called when the plugin is loaded. Use dynamically created objects as show in the
above example.

These changes will be available in the next Geany release but you can start using
them right away in your C++ plugins if you Build Geany From Git [3].

Expand Down

0 comments on commit 5f341e8

Please sign in to comment.