hi ,
i am doing formating for column ,i have to do formate for each cell in the column like the follwing,but i have Memory performnce problem please see the attached ,when i am using the below code the GC not callinf for the grid .
colume1
1.22
1.333
1.5
and i am using the follwing code :
int d_num = int.Parse(e.Row.Cells["Decimal_points"].Value.ToString());
settings.Format =
.GetGridyMask(d_num);//retuen "0.0" or "0.00" or "0.000"
owner.Settings = settings;
e.Row.Cells[
"MW_OPENING_PRICE"].Editor = new EditorWithText (owner);
Hi,
Well... again it's hard to help you out here with so little information.
But... just from the code you have here I can see that the memory usage of your application will continue to rise the longer you run it. The InitializeRow event fires any time a new row is created and also any time a value in a cell changes. So your code will continuously be creating new EditorWithText objects and assigned and reassigning them to the same cell.
You should probably create some sort of caching mechanism and try to re-use the same EditorWithText in as many cells as possible instead of creating a new one for every cell.
thanks for quick response ,let me descript the issue ,I am using ultrawingrid and in the row initializing I put the above code put my problem is when I run the application it’s taken huge memory and as you know Ants memory profiler given me an alert there is some control in your application not going to dispose this mean not able to call the garbage collection (GC) so ,can you please guide me to find some way to prevent this undisposible cell object or how can I dispose the cell until I did not dispose the grid it’s self
I'm afraid I do not understand what you are asking or what this screen shot is supposed to mean. It's clearly a screen shot of Ants memory profiler, but without any context of what you did to produce this, it's meaningless.
I can tell you that since you are declaring a new EditorWithText here, you are responsible for disposing of that object. The grid cannot assume that just because the grid is disposed that your editor should be disposed, too.