Potential Memory Leak

Simon Scott 306 Reputation points
2022-09-12T10:58:27.567+00:00

Good morning all,

I have an Windows form based app which runs on various PC's 24/7.

However, the application over time consumes RAM and the PC will crash if not restarted manually.

My initial thoughts are to set a timer on the APP to restart after a certain period of time. However, i feel this isn't the best way to do this.

Can anyone help?

Thanks
Simon

Developer technologies | .NET | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Olaf Helper 47,586 Reputation points
    2022-09-14T08:44:23.42+00:00

    However, i am a basic programmer and have no idea what to do!

    Run the VS Code Analysis, it show common design failures, like missing .Dispose() calls on managed objects, which causes high memory consumption.

    https://github.com/MicrosoftDocs/visualstudio-docs/blob/main/docs/code-quality/how-to-run-code-analysis-manually-for-managed-code.md


1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 81,981 Reputation points Volunteer Moderator
    2022-09-12T17:39:11.92+00:00

    the best solution is to fix the memory leak.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.