Click here to Skip to main content
15,921,028 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: Info on tests mentioning manufacturer's name and product Pin
Nelek30-Nov-19 9:52
protectorNelek30-Nov-19 9:52 
GeneralI love getting the garbage collector to do my other chores too Pin
honey the codewitch30-Nov-19 1:00
mvahoney the codewitch30-Nov-19 1:00 
GeneralRe: I love getting the garbage collector to do my other chores too Pin
Greg Utas30-Nov-19 4:07
professionalGreg Utas30-Nov-19 4:07 
GeneralRe: I love getting the garbage collector to do my other chores too Pin
honey the codewitch30-Nov-19 4:13
mvahoney the codewitch30-Nov-19 4:13 
PraiseRe: I love getting the garbage collector to do my other chores too Pin
User 1106097930-Nov-19 5:36
User 1106097930-Nov-19 5:36 
GeneralRe: I love getting the garbage collector to do my other chores too Pin
honey the codewitch30-Nov-19 5:44
mvahoney the codewitch30-Nov-19 5:44 
PraiseRe: I love getting the garbage collector to do my other chores too Pin
Daniel Pfeffer30-Nov-19 8:13
professionalDaniel Pfeffer30-Nov-19 8:13 
GeneralRe: I love getting the garbage collector to do my other chores too Pin
honey the codewitch30-Nov-19 8:21
mvahoney the codewitch30-Nov-19 8:21 
It's one of those things where coding it is much easier than explaining it. I'll have to whip out my trusty graphviz and throw together some visual diagrams for the article. I think that's where half the work would be.

The other half is cooking up a contrived enough example that's small enough to show how it works without being overwhelming - harder than it sounds since the main use of it is to *avoid* stressing the garbage collector, so it's something where it has to be used a lot to see a difference.

Although I can think of a "hack" using GC.Collect maybe that will force its impact to be felt. I'll have to test.

So much work for something that probably wouldn't make beyond a tip and trick, but I suppose it's helpful to know.

I ran into it clear back in the bad old days of .NET when the GC was choking on something i built and this was before I really understood the principles behind garbage collected environments. Circular references are Bad(TM). The GC will eventually figure them out (i think) if they *both* get orphaned from everything else but it's extra work and i'd have to check to be sure it did that- which i think it does, but again, extra GC bookkeeping under the hood. You really don't want to force that.

By then I was already using Boehm's garbage collector in my C++ ISAPI code (for speed - no string heap fragmentation and i'm a bastard about server performance) but since it was just for strings, and not object models circular references were never an issue.
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: I love getting the garbage collector to do my other chores too Pin
BillWoodruff30-Nov-19 23:16
professionalBillWoodruff30-Nov-19 23:16 
GeneralCcc answer Pin
The pompey30-Nov-19 0:46
The pompey30-Nov-19 0:46 
GeneralRe: Ccc answer Pin
OriginalGriff30-Nov-19 1:28
mveOriginalGriff30-Nov-19 1:28 
GeneralThought of the Day Pin
OriginalGriff29-Nov-19 4:39
mveOriginalGriff29-Nov-19 4:39 
GeneralRe: Thought of the Day Pin
Peter_in_278029-Nov-19 4:52
professionalPeter_in_278029-Nov-19 4:52 
GeneralRe: Thought of the Day Pin
Mike Hankey29-Nov-19 4:59
mveMike Hankey29-Nov-19 4:59 
AnswerRe: Thought of the Day Pin
lopatir29-Nov-19 5:52
lopatir29-Nov-19 5:52 
GeneralRe: Thought of the Day Pin
Duncan Edwards Jones29-Nov-19 6:10
professionalDuncan Edwards Jones29-Nov-19 6:10 
GeneralRe: Thought of the Day Pin
Ravi Bhavnani29-Nov-19 6:33
professionalRavi Bhavnani29-Nov-19 6:33 
GeneralRe: Thought of the Day Pin
DRHuff29-Nov-19 7:13
DRHuff29-Nov-19 7:13 
GeneralRe: Thought of the Day Pin
Eddy Vluggen29-Nov-19 7:37
professionalEddy Vluggen29-Nov-19 7:37 
GeneralQuick C# quiz Pin
honey the codewitch29-Nov-19 4:33
mvahoney the codewitch29-Nov-19 4:33 
GeneralRe: Quick C# quiz Pin
OriginalGriff29-Nov-19 4:40
mveOriginalGriff29-Nov-19 4:40 
GeneralRe: Quick C# quiz Pin
honey the codewitch29-Nov-19 4:41
mvahoney the codewitch29-Nov-19 4:41 
GeneralRe: Quick C# quiz Pin
Steve Naidamast2-Dec-19 5:49
professionalSteve Naidamast2-Dec-19 5:49 
GeneralRe: Quick C# quiz Pin
nullpointer9-Dec-19 16:39
nullpointer9-Dec-19 16:39 
GeneralRe: Quick C# quiz Pin
Richard Deeming29-Nov-19 4:51
mveRichard Deeming29-Nov-19 4:51 

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.