Fix many memory leaks.

This commit is contained in:
Petr Mrázek
2014-03-30 20:11:05 +02:00
parent e1e1d99102
commit fbc29b6a06
35 changed files with 139 additions and 103 deletions

View File

@@ -20,6 +20,7 @@
#include <QList>
#include "BaseVersion.h"
#include "BaseInstance.h"
class BaseVersion;
class BaseInstance;
@@ -72,7 +73,7 @@ public:
* - InstExists if the given instance directory is already an instance.
* - CantCreateDir if the given instance directory cannot be created.
*/
InstCreateError createInstance(BaseInstance *&inst, BaseVersionPtr version,
InstCreateError createInstance(InstancePtr &inst, BaseVersionPtr version,
const QString &instDir, const InstType type = NormalInst);
/*!
@@ -85,7 +86,7 @@ public:
* - InstExists if the given instance directory is already an instance.
* - CantCreateDir if the given instance directory cannot be created.
*/
InstCreateError copyInstance(BaseInstance *&newInstance, BaseInstance *&oldInstance,
InstCreateError copyInstance(InstancePtr &newInstance, InstancePtr &oldInstance,
const QString &instDir);
/*!
@@ -96,7 +97,7 @@ public:
* \return An InstLoadError error code.
* - NotAnInstance if the given instance directory isn't a valid instance.
*/
InstLoadError loadInstance(BaseInstance *&inst, const QString &instDir);
InstLoadError loadInstance(InstancePtr &inst, const QString &instDir);
private:
InstanceFactory();