-
.NET vs Java
Hi, i am Felipe. I am doing a program for the Imagine Cup where we all should use .NET framework. Iīm at the start of the development and i saw that my program is using like 45.000K of memory, i really think that it is abusive. Is Java just like that or am i wasting time studing deeply .NET framework that isnīt even portable? Im at a crisis, please, help me.
-
>my program is using like 45.000K of memory, i really think that it is abusive
It depends on what your program does.
>Is Java just like that
It depends on how you write it. In fact, it depends on how you've already written it. If you're wasting memory all over the place and using large features then naturally you'll have a bulky process. The same goes with Java, especially if you don't use JIT. The problem with Java and .NET is that it's so very easy to write horrible code for the sake of convenience.
>or am i wasting time studing deeply .NET framework that isnīt even portable?
I'll ignore the flamebait manner in which you asked that and say that it's impossible to waste time if you're learning something.
-
im sorry if i have been ofensive, i dont know actually how to express myself well in english, by the way, do you have any tutorial saying how to write good code that doesnīt consume much memory and is fast with .NET? Im really in need of that thank you.
-
>do you have any tutorial saying how to write good code that doesnīt consume much memory and is fast with .NET?
That's strictly an experience thing. As you practice more, you learn what works and what doesn't, what's fast and what's small, etc...
-
Is seting variables to null eficient? And should i release COM objects after using them?
-
>Is seting variables to null eficient?
Well, it's not inefficient, but it doesn't have zero overhead, especially in the presence of a garbage collector. :p
>And should i release COM objects after using them?
Uh, all resources under your control should be released when you're done with them.
-
in XAML, when i hide controls is there a way to release their memory, and when the user asks for it to appear, i reload the control ConsoleGrid in the Scene.xaml?
-
>in XAML
Despite the presence of a C# forum, we generally frown on .NET questions here.
>when i hide controls is there a way to release their memory
Hide and dispose are two completely different actions. If you want fine grained control over your memory, you're basically SOL using .NET.