mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 16:39:15 +02:00
fixed memleak in debugger from Vincent
git-svn-id: trunk@4876 -
This commit is contained in:
parent
eb5c0a7d5b
commit
9ef4196e0f
@ -627,20 +627,23 @@ begin
|
|||||||
|
|
||||||
// Check for strings
|
// Check for strings
|
||||||
ResultInfo := GetGDBTypeInfo(S);
|
ResultInfo := GetGDBTypeInfo(S);
|
||||||
if (ResultInfo = nil)
|
if (ResultInfo = nil) then Exit;
|
||||||
or (ResultInfo.Kind <> skPointer)
|
|
||||||
then Exit;
|
|
||||||
|
|
||||||
Val(AResult, addr, e);
|
try
|
||||||
if e <> 0 then Exit;
|
if (ResultInfo.Kind <> skPointer) then Exit;
|
||||||
|
Val(AResult, addr, e);
|
||||||
|
if e <> 0 then Exit;
|
||||||
|
|
||||||
if Addr = 0
|
if Addr = 0
|
||||||
then AResult := 'nil';
|
then AResult := 'nil';
|
||||||
|
|
||||||
S := Lowercase(ResultInfo.TypeName);
|
S := Lowercase(ResultInfo.TypeName);
|
||||||
if (S = 'character')
|
if (S = 'character')
|
||||||
or (S = 'ansistring')
|
or (S = 'ansistring')
|
||||||
then AResult := '''' + GetText(Pointer(addr)) + '''';
|
then AResult := '''' + GetText(Pointer(addr)) + '''';
|
||||||
|
finally
|
||||||
|
ResultInfo.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TGDBMIDebugger.GDBJumpTo(const ASource: String;
|
function TGDBMIDebugger.GDBJumpTo(const ASource: String;
|
||||||
@ -2066,6 +2069,9 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.39 2003/12/05 08:39:53 mattias
|
||||||
|
fixed memleak in debugger from Vincent
|
||||||
|
|
||||||
Revision 1.38 2003/08/15 14:28:48 mattias
|
Revision 1.38 2003/08/15 14:28:48 mattias
|
||||||
clean up win32 ifdefs
|
clean up win32 ifdefs
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ type
|
|||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
property Name: String read FName;
|
property Name: String read FName;
|
||||||
property GDBType: TGDBType read FGDBType;
|
property GDBType: TGDBType read FGDBType;
|
||||||
property Location: TGDBFieldLocation read FLocation;
|
property Location: TGDBFieldLocation read FLocation;
|
||||||
@ -112,6 +113,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
constructor CreateFromValues(const AValues: String);
|
constructor CreateFromValues(const AValues: String);
|
||||||
|
destructor Destroy; override;
|
||||||
property Ancestor: String read FAncestor;
|
property Ancestor: String read FAncestor;
|
||||||
property Arguments: TGDBTypes read FArguments;
|
property Arguments: TGDBTypes read FArguments;
|
||||||
property Fields: TGDBFields read FFields;
|
property Fields: TGDBFields read FFields;
|
||||||
@ -311,6 +313,12 @@ begin
|
|||||||
FLocation := flPublic;
|
FLocation := flPublic;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
destructor TGDBField.Destroy;
|
||||||
|
begin
|
||||||
|
if FGDBType<>nil then FreeAndNil(FGDBType);
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TGDBFields }
|
{ TGDBFields }
|
||||||
|
|
||||||
constructor TGDBFields.Create;
|
constructor TGDBFields.Create;
|
||||||
@ -550,8 +558,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
destructor TGDBType.Destroy;
|
||||||
|
begin
|
||||||
|
if FResult<>nil then FreeAndNil(FResult);
|
||||||
|
if FArguments<>nil then FreeAndNil(FArguments);
|
||||||
|
if FFields<>nil then FreeAndNil(FFields);
|
||||||
|
if FMembers<>nil then FreeAndNil(FMembers);
|
||||||
|
|
||||||
{ TGDBPType }
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TGDBPTypes }
|
||||||
|
|
||||||
constructor TGDBTypes.Create;
|
constructor TGDBTypes.Create;
|
||||||
begin
|
begin
|
||||||
@ -598,6 +615,9 @@ end;
|
|||||||
end.
|
end.
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.3 2003/12/05 08:39:53 mattias
|
||||||
|
fixed memleak in debugger from Vincent
|
||||||
|
|
||||||
Revision 1.2 2003/05/23 14:12:51 mattias
|
Revision 1.2 2003/05/23 14:12:51 mattias
|
||||||
implemented restoring breakpoints
|
implemented restoring breakpoints
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ end;
|
|||||||
|
|
||||||
procedure TGraphicsObject.Changing;
|
procedure TGraphicsObject.Changing;
|
||||||
begin
|
begin
|
||||||
Assert(False, Format('Trace:[TgraphicsObject.Changed] %s', [ClassName]));
|
Assert(False, Format('Trace:[TgraphicsObject.Changing] %s', [ClassName]));
|
||||||
if Assigned(FOnChanging) then FOnChanging(Self);
|
if Assigned(FOnChanging) then FOnChanging(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -46,6 +46,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.5 2003/12/05 08:39:53 mattias
|
||||||
|
fixed memleak in debugger from Vincent
|
||||||
|
|
||||||
Revision 1.4 2003/12/02 12:25:17 micha
|
Revision 1.4 2003/12/02 12:25:17 micha
|
||||||
try: gdi memory leak fix for pen
|
try: gdi memory leak fix for pen
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user