Click here to Skip to main content
15,893,588 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Super Lloyd14-May-19 20:32
Super Lloyd14-May-19 20:32 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch15-May-19 3:38
mvahoney the codewitch15-May-19 3:38 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Super Lloyd14-May-19 19:12
Super Lloyd14-May-19 19:12 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch14-May-19 19:29
mvahoney the codewitch14-May-19 19:29 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Super Lloyd14-May-19 19:40
Super Lloyd14-May-19 19:40 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
johannesnestler15-May-19 4:09
johannesnestler15-May-19 4:09 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch15-May-19 5:17
mvahoney the codewitch15-May-19 5:17 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch14-May-19 17:44
mvahoney the codewitch14-May-19 17:44 
Adding, I hope you never count on those finalizers being called.

Designing your code such that they are dependant on them in any way is terrible design.

If I want to truly manage the disposal of objects, I'll keep a list of them and track them myself.

That's the proper way to do it.

Always
Call
Dispose.

On any disposable interface. If you don't do it assume you are leaking

If you want to use that additional set aside GC list for finalization be my guest, but your users are WRONG if they ever write code that needs it.

And I'd rather ASSERT that sort of wrong then try to manage it, because of the other problems i mentioned.

Consider this: - and I've done this on a web server in the real world and learned the hard way - which is one of the reasons i don't use finalize anymore!

Create GDI ico handles by using shell calls.

Forget to call dispose on a few of them, but implement finalizers.

I'll bet you my next check you run out of GDI handles and your system just stops producing more.

Until you restart the webserver

This is WITH your finalizers.

At least if you ASSERT you'll eventually get a debug on what happened.

I learned the hard way.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

GeneralRe: Some thoughts on the .net CLR/CLI Pin
Gerardo Orozco15-May-19 8:00
Gerardo Orozco15-May-19 8:00 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch15-May-19 8:08
mvahoney the codewitch15-May-19 8:08 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
PIEBALDconsult14-May-19 6:21
mvePIEBALDconsult14-May-19 6:21 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch14-May-19 6:42
mvahoney the codewitch14-May-19 6:42 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
PIEBALDconsult14-May-19 7:51
mvePIEBALDconsult14-May-19 7:51 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Sander Rossel14-May-19 9:07
professionalSander Rossel14-May-19 9:07 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch14-May-19 9:26
mvahoney the codewitch14-May-19 9:26 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Dan Neely14-May-19 9:32
Dan Neely14-May-19 9:32 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch14-May-19 12:15
mvahoney the codewitch14-May-19 12:15 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Dan Neely14-May-19 14:09
Dan Neely14-May-19 14:09 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch14-May-19 14:26
mvahoney the codewitch14-May-19 14:26 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Gary R. Wheeler14-May-19 12:43
Gary R. Wheeler14-May-19 12:43 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch14-May-19 13:15
mvahoney the codewitch14-May-19 13:15 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Member 916705714-May-19 22:04
Member 916705714-May-19 22:04 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
Eddy Vluggen15-May-19 0:58
professionalEddy Vluggen15-May-19 0:58 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
honey the codewitch15-May-19 3:37
mvahoney the codewitch15-May-19 3:37 
GeneralRe: Some thoughts on the .net CLR/CLI Pin
kalberts15-May-19 3:30
kalberts15-May-19 3:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.