log history memory usage add fix virtual dtor for Action subclasses to be deleted from memory
This commit is contained in:
@@ -157,6 +157,21 @@ public:
|
||||
m_canvas->m_layers[m_layer_idx].m_rtt[i].unbindTexture();
|
||||
}
|
||||
}
|
||||
virtual size_t memory() override
|
||||
{
|
||||
size_t mem = 0;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
glm::vec2 sz = m_box[i].zw() - m_box[i].xy();
|
||||
mem += sz.x * sz.y * 4 + sizeof(*this);
|
||||
}
|
||||
return mem;
|
||||
}
|
||||
virtual ~ActionStroke()
|
||||
{
|
||||
|
||||
LOG("ActionStroke destroyed: free %zu bytes", memory());
|
||||
}
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
Reference in New Issue
Block a user