well, for 1, just because you mark an object for collection doesn't mean it will be collected, even with GC.Collect. objects get elevated to different generations depending on how long they live. ...
Type: Posts; User: bling
well, for 1, just because you mark an object for collection doesn't mean it will be collected, even with GC.Collect. objects get elevated to different generations depending on how long they live. ...
yes, very confusing indeed :mad:!! i hope Sebastiani's link from MSDN made it a little more clear.
basically:
a) the programmer cannot deterministically clean up managed resources
b)...
i will say that *properly* implementing the IDisposable pattern in .NET is a complete pain in the butt with numerous places where you can screw up. and since it is a pattern, there is no guarantee...
well, if you're argument is simply to do something upon construction and destruction, rather than allocating/deallocating memory, then there really isn't much difference between C#'s IDisposable...
yes, you *could* do that with a constructor/destructor, but i'm still unconvinced from your XML example why C# lacking true deterministic deallocation is "inherently flawed."
edit: btw, i say true...
for me personally i am way more productive with C# than i am with C++, and using the library is much more convenient/consistent than a mix/match of Win32, stdlib, or boost libraries.
back on...
i think u mean to say unmanaged resources.
a namespace is comparable to a package in java.
don't think so.
it's pretty simple you're on the right track.
based on
<people>
<location>
<list name="ben" surname="gunn" location="peru" dwelling="house"/>
</location>
</people>
i find it useful for regex as well.
learn both. and a dynamic language like python or ruby.
^ and % are the same as * and & except they are used to differentiate between managed types and native types. this was added in C++/CLI. managed C++ is the older version which used */& for both...
just to be on the safe side, this statement is correct 99.9% of the time. in multithreaded environments, sometimes the constructor isn't threadsafe, and when it throws an exception it will leak a...
the verdict from all data we have so far is that doing a cast with error check results in an advantage *sometimes* for the 'as' method, depending on the amount of information the compiler has. i'm...
wow, that's surprising! changing it to object yields roughly the same time on my machine. stupid compiler doing stupid tricks!
t.Size = new Size(300, 20);
the point of the calculations was to insure that the compiler doesn't optimize, like what happened when you remove the calculations (since the List<int> isn't used for anything, that code is...
since i'm bored outta my mind right now, and to prove the vast difference,
static void Main(string[] args)
{
List<int> list = new List<int>();
int count = 0;
...
no it's not. you have a try/catch, which uses extra clock cycles.
they are faster because they won't throw exceptions. if the cast fails, the result is null.
1) read up on the Validating event.
2) if you have a choice between Convert.ToXXX(...) and XXX.TryParse(...), use the latter because it's faster.
3) if you're dealing with references, the 'as'...
i don't understand. why can't you just use the KeyDown event?
a glorified global variable IMO.
maybe wrapper isn't the proper term to be using...windows programming is very much C-style, where there are tons and tons of global functions and global #defines, so they had to convert that into...