Click here to Skip to main content
15,905,614 members
Home / Discussions / C#
   

C#

 
GeneralRe: The best way to set all the datagrid cells of a row with the same value Pin
Member 1144944712-Jan-16 3:09
Member 1144944712-Jan-16 3:09 
GeneralRe: The best way to set all the datagrid cells of a row with the same value Pin
Pete O'Hanlon12-Jan-16 3:12
mvePete O'Hanlon12-Jan-16 3:12 
Questiondtsearch engine/desktop C#? Pin
Hossei_Da_Hustla11-Jan-16 5:40
Hossei_Da_Hustla11-Jan-16 5:40 
AnswerRe: dtsearch engine/desktop C#? Pin
OriginalGriff11-Jan-16 5:52
mveOriginalGriff11-Jan-16 5:52 
AnswerRe: dtsearch engine/desktop C#? Pin
Richard Deeming11-Jan-16 5:58
mveRichard Deeming11-Jan-16 5:58 
QuestionReport Builder in Visual Studio Pin
milo-xml11-Jan-16 3:11
professionalmilo-xml11-Jan-16 3:11 
GeneralRe: Report Builder in Visual Studio Pin
V.11-Jan-16 3:40
professionalV.11-Jan-16 3:40 
GeneralRe: Report Builder in Visual Studio Pin
milo-xml11-Jan-16 4:54
professionalmilo-xml11-Jan-16 4:54 
AnswerRe: Report Builder in Visual Studio Pin
V.11-Jan-16 19:59
professionalV.11-Jan-16 19:59 
GeneralRe: Report Builder in Visual Studio Pin
milo-xml12-Jan-16 1:27
professionalmilo-xml12-Jan-16 1:27 
AnswerRe: Report Builder in Visual Studio Pin
Gerry Schmitz11-Jan-16 4:54
mveGerry Schmitz11-Jan-16 4:54 
GeneralRe: Report Builder in Visual Studio Pin
milo-xml11-Jan-16 5:08
professionalmilo-xml11-Jan-16 5:08 
GeneralRe: Report Builder in Visual Studio Pin
Gerry Schmitz11-Jan-16 5:29
mveGerry Schmitz11-Jan-16 5:29 
AnswerRe: Report Builder in Visual Studio Pin
Mycroft Holmes11-Jan-16 12:04
professionalMycroft Holmes11-Jan-16 12:04 
QuestionC# Run Powershell with elevated rights Pin
Member 1085106210-Jan-16 15:06
Member 1085106210-Jan-16 15:06 
AnswerRe: C# Run Powershell with elevated rights Pin
Garth J Lancaster10-Jan-16 16:54
professionalGarth J Lancaster10-Jan-16 16:54 
QuestionMemory leak trouble with Linq to Sql and multiple threads Pin
JD869-Jan-16 14:07
JD869-Jan-16 14:07 
AnswerRe: Memory leak trouble with Linq to Sql and multiple threads Pin
Dave Kreskowiak9-Jan-16 18:05
mveDave Kreskowiak9-Jan-16 18:05 
GeneralRe: Memory leak trouble with Linq to Sql and multiple threads Pin
JD8610-Jan-16 16:41
JD8610-Jan-16 16:41 
GeneralRe: Memory leak trouble with Linq to Sql and multiple threads Pin
Dave Kreskowiak10-Jan-16 17:19
mveDave Kreskowiak10-Jan-16 17:19 
AnswerRe: Memory leak trouble with Linq to Sql and multiple threads Pin
Luc Pattyn9-Jan-16 18:07
sitebuilderLuc Pattyn9-Jan-16 18:07 
Hmm. Applying explicit GC operations is not supposed to make much of a difference.

And actually context is the one item you are not disposing, and probably the caller of Execute() should take care of that, not Execute() itself.

BTW: rather than finally, I prefer the using pattern for disposable objetcs; example:
using (ExchActions powershell = new ExchActions()) {
    ...
}


No matter how the using block is exited (normally, return, exception) the newly created object will always be disposed of correctly; and you can nest them as much as needed.

I see you open a DB connection but never close it. There too you should be able to apply a using construct.

DB connections get pooled, i.e. recycled, very well assuming you close or dispose them in time. Otherwise the system may exhaust the default pool and try to create large numbers of connections...

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Memory leak trouble with Linq to Sql and multiple threads Pin
Dave Kreskowiak9-Jan-16 18:20
mveDave Kreskowiak9-Jan-16 18:20 
GeneralRe: Memory leak trouble with Linq to Sql and multiple threads Pin
Luc Pattyn9-Jan-16 18:29
sitebuilderLuc Pattyn9-Jan-16 18:29 
GeneralRe: Memory leak trouble with Linq to Sql and multiple threads Pin
Dave Kreskowiak9-Jan-16 18:36
mveDave Kreskowiak9-Jan-16 18:36 
GeneralRe: Memory leak trouble with Linq to Sql and multiple threads Pin
JD8610-Jan-16 16:31
JD8610-Jan-16 16:31 

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.