TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
patrick
NA
397
0
Memory leak problem
Mar 3 2011 9:28 PM
My program is hitting 500,000k memory and more until it crashes. It uses 50,000k when it first loads. I realized that it climbs in usage and never goes down, and I think I have narrowed the problem down to the way I am switching forms. Here is my code:
if (Properties.Settings.Default.isCashRegister)
{
callerIDTimer.Enabled = false;
if (Functions.IsConnectionAvailable())
{
if (Settings.Default.NumberOfRegisters != 1)
{
var cashRegisterInstance = new cashRegisterForm(Properties.Settings.Default.registerNumber);
}
else
{
var cashRegisterInstance = new cashRegisterForm(1);
Hide();
cashRegisterInstance.Show();
cashRegisterInstance.FormClosed += Instance_FormClosed;
}
}
else
{
MessageBox.Show(Classes.ErrorMessages.ConnectionError1.ToString());
}
}
else
{
MessageBox.Show("Not a cash register station.");
}
Does anyone know where the problem might be?
Reply
Answers (
11
)
Erreur dans Csharp
what are callback functions?