Back

LL019

Create without try/finally

Object Pascal — Delphi & Free Pascal
Warning
Reliability

Object lifetime without guaranteed cleanup frequently leaks resources

object lifetime without guaranteed cleanup frequently leaks resources.

Why this severity

object lifetime without guaranteed cleanup frequently leaks resources.


Known false positives

ownership transferred immediately to containers with deterministic cleanup.

Remediation example

Obj := TObject.Create;
try
  UseObj(Obj);
finally
  Obj.Free;
end;

Reconnecting… Connection lost. Reload