[Qgis-developer] Memory problems in QGIS Application
Federico J. Fernández
federico.fernandez at gmail.com
Fri Feb 11 21:38:37 EST 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110211/8620e041/attachment.html
More information about the Qgis-developer
mailing list