Skip to content

[Bug]: Memory leak in StreamToString #118

@macc2010

Description

@macc2010

RAL Version:

1.0

IDE:

Delphi 10.4 Sydney

Operating System:

Windows

Bug Description

In function StreamToString(AStream: TStream): StringRAL;

it is created this object :

 vStream := TRALStringStream.Create(AStream);

But never freed

Steps to reproduce the bug

Calling the function

Expected behavior

The solution should be :

vStream := TRALStringStream.Create(AStream);
try
  Result := TRALStringStream(vStream).DataString;
finally
  vStream.Free;
end;

Instead of current implementation :

vStream := TRALStringStream.Create(AStream);
Result := TRALStringStream(vStream).DataString;

Pictures of the issue

No response

Referral

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ide: DelphiIssues that impact the Delphi IDEos: WindowsIssues that happens on Windowspri: HighHighest Priority for issues that are confirmed bugsrev: OngoingWhen a reported issue was able to be reproduced and is currently being worked onsec: DBWareIssues that happen with the DBWare feature of the packageseg: ServerIssues that happen on the Server side of the packagesev: LowThe degree on which the issue impacts functionality of the packagevcs: ErrorWhen the issue is a bug

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions