Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add note about static initialization of C++ classes

  • Loading branch information...
commit 5f341e839079da39a13662b71e26387d20b57fd0 1 parent bcb6911
@elextr elextr authored committed
Showing with 6 additions and 0 deletions.
  1. +6 −0 vol_5/newsletter_5.rst
View
6 vol_5/newsletter_5.rst
@@ -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].
Please sign in to comment.
Something went wrong with that request. Please try again.