Archived issue #0024315
Use delayed release of resources in OpenGl aspects for consistency
Description
For shared OpenGl resources the common style is to use delayed release procedure. There is an inconsistency in release approaches used within OpenGl aspects - it should be revised in a unified manner.
Delayed release here:
But instant release here:
Delayed release here:
void OpenGl_AspectMarker::Release (...)
{
...
if (myResources.SpriteKey.IsEmpty())
{
...
}
else
{
...
theCtx->ReleaseResource (myResources.SpriteKey, Standard_True);
theCtx->ReleaseResource (myResources.SpriteAKey, Standard_True);
}
...
}
But instant release here:
void OpenGl_AspectMarker::Resources::BuildSprites (...)
{
if (aNewResource)
{
if (!Sprite.IsNull())
{
if (SpriteKey.IsEmpty())
{
...
}
else
{
Sprite.Nullify(); // we need nullify all handles before ReleaseResource() call
aContext->ReleaseResource (SpriteKey);
}
}
...
}
...
}
Public activity
3 archived notes
Participants are labeled by their role within this record.
Dear kgv,
Could you please review CR24315?
Could you please review CR24315?
Please test the patch.
Dear Commenter 1,
Branch CR24315 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 317 (317 on master)
Windows: 0 (0 on master)
products component :
Linux: 188 (189 on master)
Windows: 287 (287 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 357181336 / 357253212
Total CPU difference: 43580.85000000006 / 43279.94000000018
Testing on Windows:
Total MEMORY difference: 411875724 / 411574748
Total CPU difference: 33102.0 / 34417.59375
There are not differences in images found by testdiff.
Branch CR24315 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 317 (317 on master)
Windows: 0 (0 on master)
products component :
Linux: 188 (189 on master)
Windows: 287 (287 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 357181336 / 357253212
Total CPU difference: 43580.85000000006 / 43279.94000000018
Testing on Windows:
Total MEMORY difference: 411875724 / 411574748
Total CPU difference: 33102.0 / 34417.59375
There are not differences in images found by testdiff.
Related records