Re: [ADVANCED-DOTNET] Unmanaged resources in a static class

2008-09-18 Thread Greg Young
I have personally experienced problems with windows not properly handling resources when processes are closed, in particular sockets. We have some apps that act at TCP servers, if not shutdown properly windows will periodically not allow another process to access the socket the server was listenin

Re: [ADVANCED-DOTNET] Unmanaged resources in a static class

2008-09-18 Thread Curt Hagenlocher
On Wed, Sep 17, 2008 at 6:25 PM, Simon Robinson <[EMAIL PROTECTED]> wrote: > > right up until the app shuts down. However I am a bit nervous - this means > I'm entirely dependant on Windows to release all these resources when the > process ends, and although Windows should do that, to be honest I'm

Re: [ADVANCED-DOTNET] Inheritance in LINQ-SQL Framework and/or ADO.NET Entity Framework

2008-09-18 Thread Frans Bouma
So how are you going to 'version' everything? Say you have Table T1. This is a generic table, so it's in your 'base' schema. You build your app and release it. Now a new field, FN, is to be added to T1 for a particular specific feature for this customer, and as it's a specific app anyway, it's onl

Re: [ADVANCED-DOTNET] Inheritance in LINQ-SQL Framework and/or ADO.NET Entity Framework

2008-09-18 Thread Mike Andrews
Normally, I would agree Frans, however in this case it's a requirement. To explain further, I have a base "application" (which is a designer of sorts) and database. The database itself contains the bare essentials for this project. Now, I don't want to "mess up" the database as it is because it wo

Re: [ADVANCED-DOTNET] Unmanaged resources in a static class

2008-09-18 Thread Geoff Taylor
Hi, As Greg says, make your static class an instance class (with instance methods, properties and resources, and your cleanup code in its finaliser) and then maintain one (and only one) static reference to an instance of this class. One nice way of doing this is the Singleton pattern: http://w