Simulators and firmwares unregistered when application ends (fixes memory leaks)
This commit is contained in:
@@ -81,3 +81,9 @@ SimulatorFactory *getSimulatorFactory(const QString &name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void unregisterSimulators()
|
||||
{
|
||||
foreach(SimulatorFactory *factory, registered_simulators) {
|
||||
delete factory;
|
||||
}
|
||||
}
|
||||
@@ -118,6 +118,7 @@ class SimulatorFactory {
|
||||
};
|
||||
|
||||
void registerSimulators();
|
||||
void unregisterSimulators();
|
||||
SimulatorFactory *getSimulatorFactory(const QString &name);
|
||||
extern QMap<QString, SimulatorFactory *> registered_simulators;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user