mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- Fixed: The SimpleCanvas in FCanvasTexture must be declared as a soft
root to the garbage collector. SVN r798 (trunk)
This commit is contained in:
parent
07e795e656
commit
b3635cfbd8
2 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
March 12, 2008 (Changes by Graf Zahl)
|
||||
- Fixed: The SimpleCanvas in FCanvasTexture must be declared as a soft
|
||||
root to the garbage collector.
|
||||
- Changed DObject's pointer substitution so that the pointers inside an
|
||||
object are handled by a virtual function. This allows subclasses to
|
||||
implement their own handling if they need it.
|
||||
|
|
|
@ -105,6 +105,7 @@ void FCanvasTexture::MakeTexture ()
|
|||
{
|
||||
Canvas = new DSimpleCanvas (Width, Height);
|
||||
Canvas->Lock ();
|
||||
GC::AddSoftRoot(Canvas);
|
||||
if (Width != Height || Width != Canvas->GetPitch())
|
||||
{
|
||||
Pixels = new BYTE[Width*Height];
|
||||
|
@ -127,7 +128,8 @@ void FCanvasTexture::Unload ()
|
|||
delete[] Pixels;
|
||||
}
|
||||
Pixels = NULL;
|
||||
delete Canvas;
|
||||
GC::DelSoftRoot(Canvas);
|
||||
Canvas->Destroy();
|
||||
Canvas = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue