Re: Need help - Memory corrupt message from MS VC Express 2005 (dynamic widget)



Please use the mailing list.

On Wed, 2008-07-02 at 23:29 -0700, Dmitry (aka DvpSun) wrote:
> Hello.
> I'm a novice in gtkmm and have some troubles with dynamic memory management.
> 
> I write simple program (see below) and run ше in debug mode. Window work
> correct, but after close Studio show a memory corruption (Invalid Address
> specified to RtlFreeHeap( 00CF0000, 00D031D8 )).
> 
> #include <gtkmm.h>
> 
> class ExampleWindow 
>     : public Gtk::Dialog
> {
> public:
>   ExampleWindow();
> protected:
>   Gtk::Button *m_pButton_Close;
> };
> 
> ExampleWindow::ExampleWindow()
>     : m_pButton_Close(0)
> {
>   m_pButton_Close = Gtk::manage(new Gtk::Button("Close"));
>   get_vbox()->pack_start(*m_pButton_Close);
>   show_all_children();
> }
> 
> int main(int argc, char *argv[])
> {
>   Gtk::Main kit(argc, argv);
>   ExampleWindow window;
>   Gtk::Main::run(window);
>   return 0;
> }
> 
> 
> I try very simple test program, but runtime error ocurs again.
> 
> #include <gtkmm.h>
> int main(int argc, char *argv[])
> {
>   Gtk::Main kit(argc, argv);
>   Gtk::Button *pButton = new Gtk::Button("Close");
>   delete pButton;
>   return 0;
> }
> 
> Software configuration:
> - Microsoft Visual Studio 2005, Version 8.0.50727.762  (SP.050727-7600)
> - binary gtk+ components
>   gtk dev environment (gtk-dev-2.12.9-win32-2.exe)
>   gtkmm dev environment (gtkmm-win32-devel-2.10.11-1.exe)
> 
> I have only one idea: mixed lib/dll for system windows dll during built of
> gtk/gtkmm binaries and my computer, but I've no idea, how to check this
> without building all gtk/gtkmm and so on myself. Now I am not ready to build
> all.
> 
> What mistake I do?
> 
-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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