MG: added TDeviceContextMemManager

git-svn-id: trunk@749 -
This commit is contained in:
lazarus 2002-02-09 01:46:16 +00:00
parent db7c768ec3
commit 1580317416

View File

@ -4920,7 +4920,7 @@ end;
function TgtkObject.NewDC: PDeviceContext; function TgtkObject.NewDC: PDeviceContext;
begin begin
Assert(False, Format('Trace:> [TgtkObject.NewDC]', [])); Assert(False, Format('Trace:> [TgtkObject.NewDC]', []));
New(Result); Result:=GtkDef.NewPDeviceContext;
with Result^ do with Result^ do
begin begin
hWnd := 0; hWnd := 0;
@ -4942,6 +4942,19 @@ begin
// Assert(False, Format('Trace:< [TgtkObject.NewDC] FDeviceContexts[%d] --> 0x%p', [n, Result])); // Assert(False, Format('Trace:< [TgtkObject.NewDC] FDeviceContexts[%d] --> 0x%p', [n, Result]));
end; end;
{------------------------------------------------------------------------------
procedure TgtkObject.DisposeDC(DC: PDeviceContext);
Disposes DC
------------------------------------------------------------------------------}
procedure TgtkObject.DisposeDC(pDC: PDeviceContext);
begin
if FDeviceContexts.Contains(pDC) then begin
FDeviceContexts.Remove(pDC);
GtkDef.DisposePDeviceContext(pDC);
end;
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Function: NewGDIObject Function: NewGDIObject
Params: none Params: none
@ -5298,6 +5311,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.171 2002/08/21 14:06:40 lazarus
MG: added TDeviceContextMemManager
Revision 1.170 2002/08/21 11:42:52 lazarus Revision 1.170 2002/08/21 11:42:52 lazarus
MG: reduced output MG: reduced output