Hi Chris and Steen,
In the past, I followed Chris' advice on doing:
- THIS.DataObject = "" // Release DWO resources
- THIS.Reset() // Release buffers
and that has been working great since July last year. But now Chris recommends something a little bit different, so I said let's try this:
- THIS.Reset() // Release buffers
- THIS.DataObject = "" // Release DWO resources
- Yield() // Let Garbage collection complete
All kind of weird things started to happen. I was getting blowups while running the application due to datawindows not having any rows, whereas before, they always had at least one row. It took me a while to remember this last change I did last Friday (weekend does a g_miguel.reset() ), and I undid the change: All problems went away.
So using the yield(), the execution order of events must have changed in some places in my code.
I'm not saying to not do the yield(), but just want to point out to test you code again after you do so. In my case there's too much bad coding going on, so I cannot use the yield().
Not too sure if it's the same doing things in this order:
- THIS.DataObject = "" // Release DWO resources
- THIS.Reset() // Release buffers
or doing it in this order:
- THIS.Reset() // Release buffers
- THIS.DataObject = "" // Release DWO resources
I think the last order would make more sense, so I'm going to try that out and will post if I have any problems.
Regards
MiguelL
I have done that for a while (2 months) now and it fixes ALL RANDOM CRASH happening.
And there are zero side effects.
I'm just so happy I cannot express. The random crashes constantly happened and we have been chasing our own code for moths. The "USER OBJECTS" in the windows task manager went from several hundreds to just 4 and now everything works perfect and maybe a bit faster.
*** THANK YOU Chris for this tip :-) ***
Everyone should know!!
//Steen