-
Notifications
You must be signed in to change notification settings - Fork 288
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
memory leak using primitives #1515
Comments
The only function call in |
Nevertheless, memory seems to leak when a primitive routine is called. Comment out the call, no leak. |
What happens if you call:
right before the |
Hi, regrettably, due to the extended period without a response, I was compelled to switch to a different framework to meet a project deadline. My development environment relies heavily on Delphi, necessitating a complex process to compile C code into a DLL and then adapt the headers for Delphi's use. I hope to possibly reconsider allegro in the future. I had thought about closing this issue earlier but decided against it, recognizing its validity and hoping it might eventually be acknowledged and resolved. Thank you for your assistance. Currently, I don't have a setup available for testing. This issue was initially reported several months ago, and it's possible that it has since been resolved or perhaps worsened. However, the problem can be readily identified by monitoring allocations and deallocations, which do not align, pinpointing the core issue. |
Why don't you test it, @ReiquelApplegate :) |
I'm not sure this leak is something we should worry about, since it's small and does not appear to get any bigger with repeated use. I haven't got Windows but there are a few instances in the MacOS code that look like Lines 2623 to 2632 in c4bc6dc
For sure there is memory allocated to vt which isn't reclaimed, but it is never lost and it never increases.I suspect this 56 bytes may be something like that. It would be possible to confirm where it's coming from by making use of the line / file / func parameters to the custom allocation functions. (maybe the test code will have to be rewritten in C first if @jarroddavis68 isn't able to reproduce any more) Hope that helps. |
Hi, I hooked Allegro memory allocation to Delphi and discovered a small memory leak using primitives. Here is the code:
The call to
donemem
will report and clean up any leaked memory.Test01
is the smallest example to trigger the leak. If you comment out the call theal_draw_filled_rectangle
, there will be no leak. Even in a loop, multiple calls to different primiatives, there is only1 allocation
,56 bytes
in size.The text was updated successfully, but these errors were encountered: