V
Volker Hetzer
Hi!
We are thinking of doing some performance intensive parts
of our application in C#.
However, I'm a bit concerned about this GC stuff.
From my time as C++ programmer it was pretty easy to
use heavy objects that for instance contain a database conenction
and I could be sure that when the function ended, the connection
object executed a proper disconnect.
So, given class B, I could
int f()
{
B MyConnection;
....
return 0;
}
int c()
{
f();
//Here the database is closed again.
}
And there was no way I could forget anything.
How does this work with C#?
Is the GC only used with objects that are created with new?
Lots of Greetings!
Volker
We are thinking of doing some performance intensive parts
of our application in C#.
However, I'm a bit concerned about this GC stuff.
From my time as C++ programmer it was pretty easy to
use heavy objects that for instance contain a database conenction
and I could be sure that when the function ended, the connection
object executed a proper disconnect.
So, given class B, I could
int f()
{
B MyConnection;
....
return 0;
}
int c()
{
f();
//Here the database is closed again.
}
And there was no way I could forget anything.
How does this work with C#?
Is the GC only used with objects that are created with new?
Lots of Greetings!
Volker