- took DCanvas and all its subtypes out of the DObject tree.
I have no idea why they were even in there, as they intentionally circumvented all GC related features - they declared themselves fixed if prone to getting collected, they all used OF_YesReallyDelete when destroying themselves and they never used any of the object creation or RTTI features, aside from a single assert in V_Init2. Essentially they were a drag on the system and OF_YesReallyDelete was effectively added just to deal with the canvases which were DObjects but not supposed to behave like them in the first place.
This commit is contained in:
parent
d407aa3157
commit
dc5a5419fc
21 changed files with 16 additions and 61 deletions
|
|
@ -114,7 +114,6 @@ void FCanvasTexture::MakeTexture ()
|
|||
{
|
||||
Canvas = new DSimpleCanvas (Width, Height, false);
|
||||
Canvas->Lock ();
|
||||
GC::AddSoftRoot(Canvas);
|
||||
|
||||
if (Width != Height || Width != Canvas->GetPitch())
|
||||
{
|
||||
|
|
@ -136,7 +135,6 @@ void FCanvasTexture::MakeTextureBgra()
|
|||
{
|
||||
CanvasBgra = new DSimpleCanvas(Width, Height, true);
|
||||
CanvasBgra->Lock();
|
||||
GC::AddSoftRoot(CanvasBgra);
|
||||
|
||||
if (Width != Height || Width != CanvasBgra->GetPitch())
|
||||
{
|
||||
|
|
@ -172,16 +170,12 @@ void FCanvasTexture::Unload ()
|
|||
|
||||
if (Canvas != NULL)
|
||||
{
|
||||
GC::DelSoftRoot(Canvas);
|
||||
Canvas->Destroy();
|
||||
Canvas = NULL;
|
||||
delete Canvas;
|
||||
}
|
||||
|
||||
if (CanvasBgra != NULL)
|
||||
{
|
||||
GC::DelSoftRoot(CanvasBgra);
|
||||
CanvasBgra->Destroy();
|
||||
CanvasBgra = NULL;
|
||||
delete CanvasBgra;
|
||||
}
|
||||
|
||||
FTexture::Unload();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue