Subj : Re: CUJ Article: Atomic Reference Counting Pointers To : comp.programming.threads From : Joseph Seigh Date : Tue Jan 04 2005 04:49 pm On Tue, 04 Jan 2005 22:29:25 +0100, Alexander Terekhov wrote: > > Joseph Seigh wrote: >> >> On Tue, 04 Jan 2005 19:47:00 +0100, Alexander Terekhov >> wrote: >> >> > >> > Joseph Seigh wrote: >> > [...] >> >> If you had real GC (I assume you're referring to Boehm style GC) and >> its >> >> performance wasn't a problem, why would you use reference counting? >> > >> > You would use atomic without any reference counting. With real >> > GC, strong thread-safety for shared_ptr-like beasts comes almost >> > "for free" (apart from extra msync which is not needed in the case >> > of basic thread-safety). >> >> You're not making sense. Why would you use one form of GC on top of >> another? > > Replace "atomic" above by atomic and read it > again. > > Got it? > No. Java has GC. What would you use reference counting for in Java? Joe Seigh .