|
I am working on a .NET project, which needs to interact with some user defined classes - reffered to as "jobs". All job classes must implement a specific interface IJob in order order for the library to consume them. Sometimes a job class might hold unmanaged...
Started by Jørn Schou-Rode on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The semantic difference is whether you say.
It is also how Autofac's container disposal works.
|
|
We have 100+ hard drives we need to dispose of, the CEO had requested they be pulled from all decommissioned PCs before giving away. What is the best environmentally safe way to dispose of these that will prevent someone potentially getting files/data...
Started by mxmissile on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
If you are willing, but I am assuming you would just like to be rid of ... .
Them yourself, and then send them off to a professional for disposal where for disposal since most companies cannot 100% guarantee the data will not be intercepted.
|
|
I have one method that receives a Stream to write on it using a BinaryWriter. But when I dispose this BinaryWriter it also closes the stream. Can I leave it undisposed so I can leave my stream open?
Started by Jader Dias on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Jon has a NonClosingStreamWrapper in MiscUtil which should work: you wrap your stream in the non-closing... .
In the case of BinaryWriter , that isn't a direct option (although some stream wrappers do allow you to control this, for example GZipStream etc) .
|
Ask your Facebook Friends
|
I hope there's a SharePoint expert here on SO who can help with this.
Here's the problem. My SharePoint logs contain this line, several times:
An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose...
Started by Robert S. on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Location for checking Disposal caveats is:
http://blogs.msdn.com/rogerla.
|
|
Disposal At Crossroads (or General Disposal of Spellwork) Recently I performed a spell whose intentions were, I suppose, negative. It did not call for illness or death of this person - simply for them to stay away from someone else. I know of a crossroads...
Started by The Spooky Cupcake on
, 10 posts
by 7 people.
Answer Snippets (Read the full thread at mysticwicks):
You're in nature, I hope that you are cleansing....
You're looking at two different ways of disposal there, and what you've done seems to fall between the two.
Bad" and might be punished is more likely to cause you harm than improper disposal.
|
|
What procedures do people follow before recycling or disposing of old PC's?
Do you:
Remove the hard drive Damage it beyond repair Use a tool to completely wipe the hard drive. If so, which? Other Is the hard drive the only component that you "cleanse"...
Started by nzpcmad on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at serverfault):
Just wipe the drive and sell it on Craigslist....
The shred program from GNU coreutils implements this.
And yes, the hard drive is the only component I'd 'cleanse' You could use Gutmann method to wipe your hard drive .
Fire.
Load gun.
Remove hard drive.
|
|
Let's say I have two elements on a page. One is a div, and the other is its child, an achor. Let's say that I've added an event to that anchor via anchor.addEvent('click', ...) . If I set the div's .innerHTML = '' , does the ' click ' event associated...
Started by JamesBrownIsDead on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Test example:
var parent = new Element('div'); var child = new Element('div', { events : { click : function() { alert('child... .
If so, it will stay in memory until all references are removed .
It depends if you have still reference to "anchor" DOM instance .
|
|
Hi all,
I just played with Java file system API, and came down with the following function, used to copy binary files. The original source came from the Web, but I added try/catch/finally clauses to be sure that, should something wrong happen, the Buffer...
Started by paercebal on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Having an unguarded....
By the way, if one of the calls to oSBuffer.read or oDBuffer.write throws an exception, then you probably want to let that exception permeate up the call hierarchy .
Unfortunately, this type of code tends to get a bit bloated in Java .
|
|
In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further:
using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open)) { using...
Started by Eclipse on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
} finally { obj.Dispose(); }
You can explicitly call Dispose on your objects, but it won't be as safe, since if one of them throws an exception, the resources won....
The using statement is syntactic sugar that converts to:
try { obj declaration .. .
|
|
Should be an easy one. Let's say I have the following code:
void Method() { AnotherMethod(new MyClass()); } void AnotherMethod(MyClass obj) { Console.WriteLine(obj.ToString()); }
If I call "Method()", what happens to the MyClass object that was created...
Started by Nick on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
There is really nothing you can....
So it will live until the next time the GC runs where it will be collected and the memory reclaimed .
After the call to Method completes, your MyClass object is alive but there are no references to it from a rooted value .
|