Click here to Skip to main content
15,889,578 members
Home / Discussions / C#
   

C#

 
AnswerRe: Referencing Dynamic Control Array Data Pin
Member 1427108416-Apr-19 15:38
Member 1427108416-Apr-19 15:38 
SuggestionRe: Referencing Dynamic Control Array Data Pin
Richard Deeming17-Apr-19 1:07
mveRichard Deeming17-Apr-19 1:07 
AnswerRe: Referencing Dynamic Control Array Data Pin
BillWoodruff16-Apr-19 16:29
professionalBillWoodruff16-Apr-19 16:29 
AnswerRe: Referencing Dynamic Control Array Data Pin
OriginalGriff16-Apr-19 21:22
mveOriginalGriff16-Apr-19 21:22 
QuestionJson formatting using an object in c# Pin
ATLDev15-Apr-19 11:52
ATLDev15-Apr-19 11:52 
AnswerRe: Json formatting using an object in c# Pin
OriginalGriff15-Apr-19 21:21
mveOriginalGriff15-Apr-19 21:21 
GeneralRe: Json formatting using an object in c# Pin
Rob Philpott16-Apr-19 6:21
Rob Philpott16-Apr-19 6:21 
AnswerRe: Json formatting using an object in c# Pin
Richard Deeming16-Apr-19 7:47
mveRichard Deeming16-Apr-19 7:47 
GeneralRe: Json formatting using an object in c# Pin
ATLDev18-Apr-19 6:08
ATLDev18-Apr-19 6:08 
GeneralRe: Json formatting using an object in c# Pin
Richard Deeming18-Apr-19 7:30
mveRichard Deeming18-Apr-19 7:30 
QuestionHow to fill between two spline curves with two different colors in C# Pin
Member 1332584612-Apr-19 10:01
Member 1332584612-Apr-19 10:01 
AnswerRe: How to fill between two spline curves with two different colors in C# Pin
Gerry Schmitz13-Apr-19 5:49
mveGerry Schmitz13-Apr-19 5:49 
AnswerRe: How to fill between two spline curves with two different colors in C# Pin
jschell13-Apr-19 6:17
jschell13-Apr-19 6:17 
AnswerRe: How to fill between two spline curves with two different colors in C# Pin
RodStephens13-Apr-19 6:40
RodStephens13-Apr-19 6:40 
QuestionTalk Over Mic To Remote PCs Pin
Kevin Marois11-Apr-19 10:57
professionalKevin Marois11-Apr-19 10:57 
AnswerRe: Talk Over Mic To Remote PCs Pin
Richard MacCutchan11-Apr-19 20:30
mveRichard MacCutchan11-Apr-19 20:30 
GeneralRe: Talk Over Mic To Remote PCs Pin
Kevin Marois12-Apr-19 4:34
professionalKevin Marois12-Apr-19 4:34 
GeneralRe: Talk Over Mic To Remote PCs Pin
Gerry Schmitz12-Apr-19 5:02
mveGerry Schmitz12-Apr-19 5:02 
GeneralRe: Talk Over Mic To Remote PCs Pin
#realJSOP12-Apr-19 5:11
mve#realJSOP12-Apr-19 5:11 
GeneralRe: Talk Over Mic To Remote PCs Pin
Gerry Schmitz12-Apr-19 9:18
mveGerry Schmitz12-Apr-19 9:18 
GeneralRe: Talk Over Mic To Remote PCs Pin
Richard MacCutchan12-Apr-19 6:08
mveRichard MacCutchan12-Apr-19 6:08 
AnswerRe: Talk Over Mic To Remote PCs Pin
jschell13-Apr-19 6:21
jschell13-Apr-19 6:21 
QuestionHow instantly free up the memory for List<T> & DataSet Pin
Mou_kol11-Apr-19 9:42
Mou_kol11-Apr-19 9:42 
1) in one of my routine i used many list and dataset. i populated those with high volume of data. when event used end then clear memory for list like

list1 = null and GC.Collect() in my routine but i am not sure that memory occupied by List1 is instantly clear or will be clear later. please share the knowledge.

2) in case of dataset i clear like

C#
dataset1.Dispose()

dataset1=null

GC.Collect()


but i am not sure that memory occupied by dataset1 is instantly clear or will be clear later. please share the knowledge.

3) if i call GC.Collect() several time in my one routine does degrade the performance of my application ?

i found one link which said best option to release memory for list this way

first clear List and then call TrimExcess. is it the right one ?

i used like
C#
list1=null & GC.Collect()


which one is best to clear memory for list instantly ?

please see my code below which works well.
C#
private void button2_Click(object sender, EventArgs e)
        {
            var before = System.Diagnostics.Process.GetCurrentProcess().VirtualMemorySize64;

            List<string> lst1 = new List<string>();

            for (int i = 0; i <= 1000000; i++)
            {
                lst1.Add("Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test ");
            }

            var after = System.Diagnostics.Process.GetCurrentProcess().VirtualMemorySize64;

            lst1.Clear();
            lst1.TrimExcess();

            var current = System.Diagnostics.Process.GetCurrentProcess().VirtualMemorySize64;
        }


please share best option to clear memory for list & dataset instantly. thanks
AnswerRe: How instantly free up the memory for List<T> & DataSet Pin
Luc Pattyn11-Apr-19 11:56
sitebuilderLuc Pattyn11-Apr-19 11:56 
GeneralRe: How instantly free up the memory for List<T> & DataSet Pin
Mou_kol14-Apr-19 1:29
Mou_kol14-Apr-19 1:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.