I&#39;ve been experiencing memory problems with a QGIS Application that I&#39;m doing with the QGIS API.<br><br>I tried to make the minimal application that seg faults, and I found this:<br><br><div style="margin-left: 40px;">
INT WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,<br>    PSTR lpCmdLine, INT nCmdShow)<br>{<br>  // Start the Application<br>  int argc = 0;<br>  QgsApplication app(argc, 0, TRUE);<br>  MainWindow * mypMainWindow = new MainWindow();<br>
  [...]<br></div><br><br><br><div style="margin-left: 40px;">MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)<br>    : QMainWindow(parent,fl)<br>{<br>  QgsMapCanvas *m = new QgsMapCanvas(this);<br>  delete m;<br>  [...]<br>
<br><br></div>Visual Studio closes the application with:<br><br><div style="margin-left: 40px;">Unhandled exception at 0x773c2016 in ???????????????.exe: 0xC0000005: Access violation reading location 0x174bdc83.<br></div>
<br>Stopping at line &quot;delete m;&quot;<br><br>Any clue? Thanks in advance.<br><br>--<br>federico<br>