Re: [GD-General] Compile times
Brought to you by:
vexxed72
From: Thatcher U. <tu...@tu...> - 2002-12-17 19:51:41
|
On Dec 17, 2002 at 10:21 -0800, Mick West wrote: > > Behalf Of Thatcher Ulrich > > > > On Dec 16, 2002 at 11:46 -0600, brian hook wrote: > > > introducing a degree of non-determinism in my code (smart pointers), > > > > Note: the behavior of ref-counted smart pointers is > > completely deterministic. (That's one of the nice things > > about ref-counting, compared to other GC approaches.) > > Well, all code is completely deterministic, if you want to get picky. When you compare reference counting to mark/sweep GC or multithreaded code, there's definitely a meaningful and practical distinction, even if you're not picky. Anyway, I personally think "smart pointers as an implementation of handles" is pretty worthwhile and doesn't violate Brian's original objection, which is that he doesn't know for sure when an object will be freed. I.e. you still have a manager somewhere that keeps a list of smart pointers, so nothing can go away until the manager says so. Then you put some checks in the manager to find and punish people who hold references when they shouldn't be (e.g. at level-shutdown time). So really it's a way to automate some of the discipline that Brian is advocating. -- Thatcher Ulrich http://tulrich.com |