Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe a problem with img allocation #58

Open
Kum1ta opened this issue Mar 13, 2024 · 1 comment
Open

Maybe a problem with img allocation #58

Kum1ta opened this issue Mar 13, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Kum1ta
Copy link

Kum1ta commented Mar 13, 2024

We noticed that the use of RAM only increases until the PC freezes. It gets faster and faster if you put pixels in the image. We noticed this in the function below called in a loop with mlx_loop_hook()

void	function(t_mlx *mlx)
{
	if (mlx->img)
		mlx_destroy_image(mlx->mlx, mlx->img);
	mlx->img = mlx_new_image(mlx->mlx, WIDTH, HEIGHT);
	mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 0, 0);
}
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem (OS, MLX version, drivers installed, GPU type and vendor, ...)

@Kbz-8 Kbz-8 self-assigned this Mar 24, 2024
@Kbz-8 Kbz-8 added the bug Something isn't working label Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants