Click here to Skip to main content
15,881,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: Access denied on opening a file for writing Pin
Member 405249815-Oct-09 10:34
Member 405249815-Oct-09 10:34 
GeneralRe: Access denied on opening a file for writing Pin
Luc Pattyn15-Oct-09 10:50
sitebuilderLuc Pattyn15-Oct-09 10:50 
GeneralRe: Access denied on opening a file for writing Pin
Member 405249815-Oct-09 11:13
Member 405249815-Oct-09 11:13 
GeneralRe: Access denied on opening a file for writing Pin
Luc Pattyn15-Oct-09 11:57
sitebuilderLuc Pattyn15-Oct-09 11:57 
GeneralRe: Access denied on opening a file for writing Pin
Member 405249815-Oct-09 21:40
Member 405249815-Oct-09 21:40 
GeneralRe: Access denied on opening a file for writing Pin
Member 405249815-Oct-09 9:21
Member 405249815-Oct-09 9:21 
GeneralRe: Access denied on opening a file for writing Pin
Luc Pattyn15-Oct-09 9:26
sitebuilderLuc Pattyn15-Oct-09 9:26 
QuestionProblems with disposing rescources Pin
Kaare Tragethon15-Oct-09 7:37
Kaare Tragethon15-Oct-09 7:37 
I'm a newbie in computer programming so please have this in mind.

I have a class called Pinger which does basic pinging of hosts on a network. I'm currently implementing a network scanner so I create an array (254) of Pinger's. The problem occurs when I try to dispose the array after I've done the scan. I dispose every Pinger in the array - the Pinger class contains Dispose methods (GC.SuppressFinalize).

Still, the array of Pinger's still uses a lot of rescources on my system and I can clearly see the memory beeing freed when I close my application.

Does anyone have any idea on how to correctly get rid of the rescources being used (after I'm finished using them)?

I have the complete project, but couldn't find a way to upload it so if anyone want's to see it let me know how I can send you the project.....

private void AllPingsFinished()
{
    //Clears the counter for the list-view
    counterForInsert = 0;

    //Loops through all the pingers in the array (which contains data)
    foreach (Pinger str in _pinger)
    {
        if (str != null)
        {
            //Disposes the current pinger (if not null)
            str.Dispose();
        }
    }
}pre>

AnswerRe: Problems with disposing rescources Pin
I Believe In GOD15-Oct-09 7:46
I Believe In GOD15-Oct-09 7:46 
GeneralRe: Problems with disposing rescources Pin
Kaare Tragethon15-Oct-09 7:49
Kaare Tragethon15-Oct-09 7:49 
AnswerRe: Problems with disposing rescources Pin
Luc Pattyn15-Oct-09 8:12
sitebuilderLuc Pattyn15-Oct-09 8:12 
GeneralRe: Problems with disposing rescources Pin
Kaare Tragethon15-Oct-09 8:34
Kaare Tragethon15-Oct-09 8:34 
QuestionVariable Get Set Pin
I Believe In GOD15-Oct-09 6:31
I Believe In GOD15-Oct-09 6:31 
AnswerRe: Variable Get Set Pin
EliottA15-Oct-09 6:41
EliottA15-Oct-09 6:41 
GeneralRe: Variable Get Set Pin
I Believe In GOD15-Oct-09 7:42
I Believe In GOD15-Oct-09 7:42 
AnswerRe: Variable Get Set Pin
Henry Minute15-Oct-09 6:55
Henry Minute15-Oct-09 6:55 
GeneralRe: Variable Get Set Pin
I Believe In GOD15-Oct-09 7:40
I Believe In GOD15-Oct-09 7:40 
QuestionCheckBox limiting. [modified] Pin
Gregory Bryant15-Oct-09 5:05
Gregory Bryant15-Oct-09 5:05 
AnswerRe: ControlBox limiting. Pin
Luc Pattyn15-Oct-09 5:13
sitebuilderLuc Pattyn15-Oct-09 5:13 
GeneralRe: ControlBox limiting. Pin
Gregory Bryant15-Oct-09 5:15
Gregory Bryant15-Oct-09 5:15 
GeneralRe: ControlBox limiting. Pin
Saksida Bojan15-Oct-09 6:06
Saksida Bojan15-Oct-09 6:06 
QuestionPassing Label's Name within a Class outside of the Form [modified] Pin
yogi_bear_7915-Oct-09 4:58
yogi_bear_7915-Oct-09 4:58 
AnswerRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 5:20
sitebuilderLuc Pattyn15-Oct-09 5:20 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
yogi_bear_7915-Oct-09 5:47
yogi_bear_7915-Oct-09 5:47 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 5:55
sitebuilderLuc Pattyn15-Oct-09 5:55 

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.