Fix recycler view test (#3537)
This commit is contained in:
@@ -107,6 +107,7 @@ public:
|
||||
|
||||
extension::Debugging* getDebuggingExtension() const { return debugging.get(); }
|
||||
|
||||
bool getCleanupOnDestruction() { return cleanupOnDestruction; }
|
||||
void setCleanupOnDestruction(bool cleanup) { cleanupOnDestruction = cleanup; }
|
||||
|
||||
gfx::UniqueDrawableBuilder createDrawableBuilder(std::string name) override;
|
||||
|
||||
@@ -74,6 +74,10 @@ Texture2DPool::Texture2DPool(Context* context_, size_t maxPoolStorage_)
|
||||
}
|
||||
|
||||
Texture2DPool::~Texture2DPool() {
|
||||
if (!context->getCleanupOnDestruction()) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(usedStorage() == 0);
|
||||
assert(unusedStorage() == poolStorage);
|
||||
shrink();
|
||||
|
||||
Reference in New Issue
Block a user