- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: .NET and destructors!!!!!!!!!!!!!
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on ".NET and destructors!!!!!!!!!!!!!"
Collapse
-
I will 'gift' you a fiver Alexei, but only if you give me a peerage for it....
(I bet you wont... )
Leave a comment:
-
Congrats! Now you owe me £100 for giving you confidence to pass the interview!
Leave a comment:
-
Well managed to get through to the third and final interview stage... really like the feel of the company, very technically oriented, jeans and t-shirts and flexi time but work hard... and then right afterwards I viewed a flat thats a five minute walk away and took it, lovely brand new place and £200 a month less than the one im in now...
A successful day
Leave a comment:
-
Sure you can mark classes as Serializable, then place attributes on properties etc to mark them as Elements, Attributes etc, and implement custom serialisation... example
But, I would think you could use LOSFormatter and ignore IIS and ASP.NET (I dont believe its dependent on IIS being installed - Ive used the ASP.Net Cache object in a Win Forms application simply by referencing the System.Web dll, and then creating an instance of the HTTPContext object. As long as you are simply calling internal methods of System.Web.UI - rather than handling HTTP requests etc - I would think you would be fine.
I wouldnt place a bet though ...
Leave a comment:
-
That's (LOSFormatter) pretty interesting thing actually - I need to do more communication between machines and it was rather annoying to create XML for class then manually copy from object data into it,
The only thing that bothers me is that it seems to be part of ASP.NET - something I am not using as I don't want to depend upon IIS - I've written my own mini webserver and it has got some pretty big advantages one of which is portability - works fine on other platforms.
Have you come across with anything similar that is noT ASP.NET related? I think I've seen somewhere possibility to mark classes as serialiseable to save/load them.
Leave a comment:
-
Cheers Alexei (hope I am spelling that correctly)...
The LOSFormatter is pretty good - its used extensively within the Framework classes and is fairly low cost performance wise (apparently the inherent Types have their own specialised implementation of such serialisation). I would imagine that MS have made that pretty watertight or else even normal applications would be falling over, as it would be difficult to avoid using it 'under the bonnet' as such.
Leave a comment:
-
Don't mention XML serialisation - I use it for configs and started using for distributed query results, and guess what? The bl00dy XML serialiser involves a LOT of effort and memory usage when its created and it was not released back! Effectively a leak with Microsoft recommending using static instance of it, which is fine, but ffs, someone really needs to compile a list of all bits in .NET that cause leaks and publish them. I will do it when I get time.
Client was the biggest issue as it runs on different environments including Mono on Linux (v poor non-generational GC there), oh well, suppose without these issues there would not be sense of achievement.
Good luck on the interview!
Leave a comment:
-
SKA is a bit out of the ordinary in terms of potential lifetime of objects I suppose... any possibility of refactoring to limit the depth of references held / size of objects maintained at Field level (which seem to linger) so the more 'transient' objects only exist at Method level? As its a distributed app, perhaps even 'chunking' the calls and saving intermediate data to Protected Storage (initially LOSformatter to serialise your objects to XML as its quick and you dont really need to mind if the data isnt optimally sized at that point in time), then periodically uploading (en masse) to the central servers using something like ZLib compression on the XML would help (smallish overhead and really compacts the XML)...? Or is it server side code that is the biggest issue...?
I know some of what I am saying is perhaps stating the obvious.... but its interesting to find out what techniques would work with an app such as SKA (cant drop the name, I know its Majesty12), as it leads to a greater understanding of what is actually happening in more modestly scaled systems and might affect my approach in general...
By the way, wish me luck - second interview tomorrow for a permanent job in local Asset and Investment Management company using .Net 2 about 300 yards from where I live.. could be the elusive foothold into the finance domain ive been seeking...Last edited by mcquiggd; 2 April 2006, 18:02.
Leave a comment:
-
Thanks David, there is still loads more work to do, would have been less if Microsoft used more of .NET for real big long running apps
Leave a comment:
-
Actually I meant that it might revert to 'I cant find the right runtime, so ill raise an exception' behaviour... if this is the case, it would prove / disprove that ALL your assemblies are being loaded into 1.1 CLR or 2.0 CLR.... or even switching between them.... this might explain the odd behaviour you have detailed...
Anyway, congratualtions on progress with SKA to date
David
Leave a comment:
-
Originally posted by mcquiggdPerhaps if you specify the version in the config file this might revert to previous behavior? Im not sure...
1) using .NET 1.1 (SP 1) with COM call to increase threads is okay - GC is working fine - you need MSCOREE to be version 1.1
2) as above but MSCOREE is version 2.0 and GC goes nuts and won't release classes with destructors - after commenting these out all was okay
3) .NET 2.0 seems to have the same effect as in 2 - even though COM call there is not necessary since they allow direct call to ThreadPool to increase number of threads used.
What really pissed me off is that whoever designed ThreadPool implemented SetMinThreads function, but did not think about SetMaxThreads - its like, if you do a MIN function, then you have to have MAX version of it!
And don't get me started on whoever implemented HttpWebRequest
Leave a comment:
-
Originally posted by AtWI was about to say "I bet Microsoft did not code their search engine in .NET", but then I changed my mind, got one entity that needs my donation already
As for the .net side by side issue and odd behaviour that seems to be a confusion about which version of the runtime is actually used by an Assembly, there is all sorts of confusion about this. My understanding is that the default behaviour changed with .Net 2 and that previously, if you built an assembly in .Net 1.1 but, say, only had the .Net 1.0 runtime installed, it would raise an exception and quit. Now, if it cant find the 1.1 runtime it defaults to loading the 2.0 runtime and doesnt actually notify you. Perhaps if you specify the version in the config file this might revert to previous behavior? Im not sure...
Leave a comment:
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Secondary NI threshold sinking to £5,000: a limited company director’s explainer Dec 24 09:51
- Reeves sets Spring Statement 2025 for March 26th Dec 23 09:18
- Spot the hidden contractor Dec 20 10:43
- Accounting for Contractors Dec 19 15:30
- Chartered Accountants with MarchMutual Dec 19 15:05
- Chartered Accountants with March Mutual Dec 19 15:05
- Chartered Accountants Dec 19 15:05
- Unfairly barred from contracting? Petrofac just paid the price Dec 19 09:43
- An IR35 case law look back: contractor must-knows for 2025-26 Dec 18 09:30
- A contractor’s Autumn Budget financial review Dec 17 10:59
Leave a comment: