Re: Why this code doesn't work?



No errors: Ubuntu,  g++ 5.2.1, gtkmm 3.16.0, pangomm 2.36.0

On 12/19/2015 11:37 AM, codekiddy wrote:


Simple example:

#include <pangomm/layout.h>
#include <gtkmm/window.h>

int main(int argc, char* argv[])
{
Glib::RefPtr<Gtk::Application> app = Gtk::Application::create( argc, argv, "gtkmm.exe" );

class TestClass :
public Gtk::Window
{
public:
TestClass()
{
layout = (create_pango_layout("blah"));
}

Glib::RefPtr<Pango::Layout> layout;
};

TestClass instance;

return app->run(instance);
}

program builds and runs fine, but when closing the app down, it throws in Layout::~Layout() destructor. Access violation reading location.

Can you reproduce this?


_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]