properly free objects on exit
This commit is contained in:
parent
6820286936
commit
bcaafc9594
1 changed files with 9 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include "renderRules.h"
|
#include "renderRules.h"
|
||||||
#include "rendering.h"
|
#include "rendering.h"
|
||||||
#include <SkImageEncoder.h>
|
#include <SkImageEncoder.h>
|
||||||
|
#include <SkGraphics.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
@ -244,7 +245,10 @@ void runSimpleRendering( string renderingFileName, string resourceDir, Rendering
|
||||||
} else {
|
} else {
|
||||||
osmand_log_print(LOG_INFO, "Tile successfully saved to %s", info->tileFileName.c_str());
|
osmand_log_print(LOG_INFO, "Tile successfully saved to %s", info->tileFileName.c_str());
|
||||||
}
|
}
|
||||||
|
delete enc;
|
||||||
delete publisher;
|
delete publisher;
|
||||||
|
delete searchRequest;
|
||||||
|
delete st;
|
||||||
delete canvas;
|
delete canvas;
|
||||||
delete bitmap;
|
delete bitmap;
|
||||||
free(bitmapData);
|
free(bitmapData);
|
||||||
|
@ -310,6 +314,11 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
runSimpleRendering(info->renderingFileName, info->imagesFileName, info);
|
runSimpleRendering(info->renderingFileName, info->imagesFileName, info);
|
||||||
|
for (int i = 1; i != argc; ++i) {
|
||||||
|
if (sscanf(argv[i], "-renderingInputFile=%s", s)) {
|
||||||
|
closeBinaryMapFile(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printUsage("Unknown command");
|
printUsage("Unknown command");
|
||||||
|
|
Loading…
Reference in a new issue