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

Memory leak in win and morphos threads #2011

Closed
DorpsGek opened this issue May 13, 2008 · 3 comments
Closed

Memory leak in win and morphos threads #2011

DorpsGek opened this issue May 13, 2008 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

michi_cc opened the ticket and wrote:

Win and Morphos thread objects are not deleted on joining, causing a memory leak.
Simple patch to fix this, tested on windows only. git diff, use -p1 to apply.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2011
@DorpsGek
Copy link
Member Author

SmatZ wrote:

The question is (at least for me) if this is the best solution.
In current code, there are still memory leaks if the thread is left unjoined.
I would rather go for a solution without "delete this".


This comment was imported from FlySpray: https://bugs.openttd.org/task/2011#comment4129

@DorpsGek
Copy link
Member Author

michi_cc wrote:

The delete has to happen somewhere as long as threads are dynamically allocated.
Either in the thread object itself or every caller has to ensure delete is called.

This patch is likely not the optimal solution, but makes the code at least consistent.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2011#comment4130

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 1, 2008

Rubidium closed the ticket.

Reason for closing: Out of date

Leaks are gone now


This comment was imported from FlySpray: https://bugs.openttd.org/task/2011

@DorpsGek DorpsGek closed this as completed Aug 1, 2008
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant