Unable to delete any GTK::Widget
- From: Erwin_X <erwinvast gmail com>
- To: gtkmm-list gnome org
- Subject: Unable to delete any GTK::Widget
- Date: Mon, 18 Feb 2008 12:20:12 -0800 (PST)
Hi,
I'm programming a C++ Windows application and i'm using gtkmm for the GUI
and having the problem
that I can not delete any GTK::Widget created (with new).
I get an Access Violation error in Visual Studio at any widget I want to
delete.
When trying to solve this problem, I made a more simpler gtkmm application.
You can find the code below.
In this application I create a window and show the window. When the window
is closed
I do the cleanup and delete the window. Result:
Unhandled exception at 0x77c2b950 in TestWindow.exe: 0x000005:
Access violation reading location 0x65552d0e.
And it is not only the window, but any widget: labels, buttons, frames ...
Perhaps I do something wrong or I'm missing something, but I can't find the
couse of the problem.
OS: Windows Vista business
IDE: Visual Studio 2008
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#pragma warning(disable: 4250)
#undef max
#include <gtkmm/main.h>
#include <gtkmm/window.h>
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPTSTR
lpCmdLine, int nCmdShow){
Gtk::Main main (NULL, 0);
Gtk::Window *window = new Gtk::Window();
main.run (*window);
delete window; // Unhandled exception at 0x77c2b950 in TestWindow.exe:
0x000005:
return 0; Access violation reading location 0x65552d0e. //
}
--
View this message in context: http://www.nabble.com/Unable-to-delete-any-GTK%3A%3AWidget-tp15549063p15549063.html
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]