Fixed memory leak caused by return statement parsing

This commit is contained in:
alexey.lysiuk 2016-02-22 14:24:34 +02:00
parent 70c663b253
commit 89ca14a587
2 changed files with 6 additions and 0 deletions

View file

@ -900,6 +900,7 @@ class FxReturnStatement : public FxExpression
public:
FxReturnStatement(FxVMFunctionCall *call, const FScriptPosition &pos);
~FxReturnStatement();
FxExpression *Resolve(FCompileContext&);
ExpEmit Emit(VMFunctionBuilder *build);
VMFunction *GetDirectFunction();

View file

@ -3525,6 +3525,11 @@ FxReturnStatement::FxReturnStatement(FxVMFunctionCall *call, const FScriptPositi
{
}
FxReturnStatement::~FxReturnStatement()
{
SAFE_DELETE(Call);
}
FxExpression *FxReturnStatement::Resolve(FCompileContext &ctx)
{
CHECKRESOLVED();