we are leaking lots of memory

This commit is contained in:
Dynamitos committed 2025-03-04 19:38:03 +09:00
1 parent 67b4a533f2
commit 5693802215
14 files changed
+182 -120

No files matched your search

+2 -2
View File
@@ -42,8 +42,7 @@ void BufferAllocation::unmap() {}
Buffer::Buffer(PGraphics graphics, uint64 size, Gfx::SeBufferUsageFlags usage, Gfx::QueueType queueType, bool dynamic, std::string name,
bool createCleared, uint32 clearValue)
: graphics(graphics), currentBuffer(0), dynamic(dynamic), createCleared(createCleared), name(name), clearValue(clearValue) {
if(size > 0)
{
if(size > 0) {
buffers.add(nullptr);
createBuffer(size, 0);
}
@@ -53,6 +52,7 @@ Buffer::~Buffer() {
for (size_t i = 0; i < buffers.size(); ++i) {
// TODO
}
buffers.clear();
}
void Buffer::updateContents(uint64 regionOffset, uint64 regionSize, void* ptr) {