I've been experiencing memory problems with a QGIS Application that I'm
doing with the QGIS API.
I tried to make the minimal application that seg faults, and I found this:
INT WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR lpCmdLine, INT nCmdShow)
{
// Start the Application
int argc = 0;
QgsApplication app(argc, 0, TRUE);
MainWindow * mypMainWindow = new MainWindow();
[...]
MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
: QMainWindow(parent,fl)
{
QgsMapCanvas *m = new QgsMapCanvas(this);
delete m;
[...]
Visual Studio closes the application with:
Unhandled exception at 0x773c2016 in ???????????????.exe: 0xC0000005: Access
violation reading location 0x174bdc83.
Stopping at line "delete m;"
Any clue? Thanks in advance.
--
federico
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer