Jump to content

Memory leak?


Go to solution Solved by Yue,

Recommended Posts

Posted

I see it too. It's not very apparent if you just look at the memory usage value, but the script memory usage value shows it better.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

 

This is really confusing, it must be my C++ programming that I am learning. But it is really strange that someone is doing well and someone is not. 

My theory is that it is exclusively when hiding a panel.  Now what I would have to do is to rebuild the whole project and evaluate what is happening. I don't see any other way. 

 

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

Posted

I am rebuilding the project with the help of ChatGPT, which tells me about a hung pointer, I have no idea what that is. But at the moment every avenze I have, I check the memory usage and it is stable

 

image.thumb.png.b154c64c3292c62c81eca1d4f69877b3.png

  • Like 1

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

Posted

 

At this point I have implemented the GUI prototype, and it is stable although in the main loop it hides the panel.

image.thumb.png.d24c43113d5396ddd3cfe3ee61a895d3.png

 

#include "Leadwerks.h"
#include "CWindow.h"
#include "CInput.h"
#include "CWorld.h"
#include "CDraw.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
{
	CWindow window;
	CInput input;

	//Context* context = Context::Create(window.Get());
	CDraw draw(window.Get());


	
	CWorld world;
	Camera* cam = Camera::Create();
	
	
	GUI* gui = GUI::Create(draw.Get());
	Widget* base = gui->GetBase();

	Widget*  pnl = Widget::Panel(200, 100, 200, 200, base);

	

	while (!window.GetClosed())
	{
		if ( input.GetKeyUp(Key::Escape)) return false;

		pnl->Hide();
		
		Time::Update();
		world.Update();
		world.Render();
	
	

		draw.InfoDebug();
		draw.Update();

	}
	return 0;


}

 

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...