473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Memory error on pda

Hello. I use the following instructions to create and to show the "forms":
Form_Exportar Ficha = new Form_Exportar(); // Project has form_exportar

Ficha.ShowDialog();

Ficha.Dispose();

Nevertheless, if I do a follow-up of the memory occupation on the PDA, I see
it's growing and It doesn't liberate itself . If I open and close several
times this form, the memory is dealing until there comes a moment in which
the application gives a memory error (full).
What about Dispose function? What's happened? Does not dispose function
work?
What can I do in order to free forms?
Thank you


Jun 1 '06 #1
3 1478
Hi,
Are you holding a reference to the form?

AFAIK there is no need to call Form.Dispose manually ,
Are you calling Form.Close ?
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Jorge" <jo***@sur-se.com> wrote in message
news:ep****************@TK2MSFTNGP04.phx.gbl...
Hello. I use the following instructions to create and to show the "forms":
Form_Exportar Ficha = new Form_Exportar(); // Project has form_exportar

Ficha.ShowDialog();

Ficha.Dispose();

Nevertheless, if I do a follow-up of the memory occupation on the PDA, I
see
it's growing and It doesn't liberate itself . If I open and close several
times this form, the memory is dealing until there comes a moment in
which
the application gives a memory error (full).
What about Dispose function? What's happened? Does not dispose function
work?
What can I do in order to free forms?
Thank you

Jun 1 '06 #2
Hi. I try to use Form.Close but It doesn't work. It fills PDA memory like
using Form.Dispose.
Also, I try Form.Close and Form.Dispose together, but It doesn't work too.

Our example project has the next structure:

Main Form with 4 buttons.
When user push a button it creates a open a new modal form. I use the next
code:

private void button2_Click(object sender, System.EventArgs e)

{

Cursor.Current = Cursors.WaitCursor;

Form_Articulos Ficha = new Form_Articulos(); // Creating the form

Cursor.Current = Cursors.Default;

Ficha.ShowDialog(); // Show form

Ficha.Close(); // Close the form

Ficha.Dispose(); // Free

}

I try with close, with dispose, without close, all combinations.

If we see pda's memory, we can see Main Form running and when we open a form
pushing one button, this form appears on pda memory. When we close the form,
it disappears, but it doesn't liberate memory occupation. When we close main
form and exit program, then memory is liberated.

What can we do?

Thanks.


"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
escribió en el mensaje news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi,
Are you holding a reference to the form?

AFAIK there is no need to call Form.Dispose manually ,
Are you calling Form.Close ?
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Jorge" <jo***@sur-se.com> wrote in message
news:ep****************@TK2MSFTNGP04.phx.gbl...
Hello. I use the following instructions to create and to show the "forms": Form_Exportar Ficha = new Form_Exportar(); // Project has form_exportar

Ficha.ShowDialog();

Ficha.Dispose();

Nevertheless, if I do a follow-up of the memory occupation on the PDA, I
see
it's growing and It doesn't liberate itself . If I open and close several times this form, the memory is dealing until there comes a moment in
which
the application gives a memory error (full).
What about Dispose function? What's happened? Does not dispose function
work?
What can I do in order to free forms?
Thank you


Jun 1 '06 #3
Hi,
Ficha.ShowDialog(); // Show form

Ficha.Close(); // Close the form

Ficha.Dispose(); // Free


No need to call neither Close nor Dispose, the form is closed already !!!
You have to call the Close() method inside the form ( or not call it at all)
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jun 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Srijit Kumar Bhadra | last post by:
Hello, Here is some sample code with pywin32 build 203 and ctypes 0.9.6. Best regards, /Srijit File: SharedMemCreate_Mutex_win32all.py # This application should be used with...
1
by: Attila.Rajmund.Nohl | last post by:
Hello! I'm using KAI C++ Compiler (KCC) Version 4.0d on Sparc Solaris 8 with Sun WorkShop 6 update 2 backend (KCC compiles C++ code to C than uses the Sun compiler to produce machine...
6
by: Andrzej | last post by:
Used to read newsgroup for answers, now have to ask for them as well. I have an application (C#, .NET 1.1) that connects to local db on MSDE 2000 SP3a (using ADO from MDAC 2.71) on one side and...
25
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
2
by: saran | last post by:
I am having a problem with MySQL consuming a lot of memory and eventually throwing an Out of Memory error and restarting itself. The symptoms are that swap usage continues to rise until some...
6
by: tgnelson85 | last post by:
Hello, C question here (running on Linux, though there should be no platform specific code). After reading through a few examples, and following one in a book, for linked lists i thought i would...
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
27
by: George2 | last post by:
Hello everyone, Should I delete memory pointed by pointer a if there is bad_alloc when allocating memory in memory pointed by pointer b? I am not sure whether there will be memory leak if I do...
2
by: ravishi | last post by:
Well, this is my first topic at this forum and I'm a newbie on C programming too. I'm coding a little program and I've used some "dynamic arrays" on it. Compiling and running the program on Linux...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.