Proposal : aggregated dlang git repository

Jakob Ovrum via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 11 00:52:23 PST 2015


On Wednesday, 11 February 2015 at 05:39:59 UTC, H. S. Teoh wrote:
> Jakob Ovrum has just submitted a PR to make (the current 
> version of)
> RefCounted reject interfaces, since currently it doesn't do that
> correctly (it refcounts the reference to the interface rather 
> than the
> target object).
>
> Given this is the current situation, it would appear to me to 
> make
> RefCounted work with class objects, "all" we have to do would 
> be to
> specialize RefCounted for classes, use malloc to allocate the 
> necessary
> space (plus the refcount, of course), and emplace() the class 
> object
> onto that space. Right?
>
> Of course, given that it has been ... oh, months? years? since
> RefCounted issues have been addressed, I'm probably just 
> kidding myself
> that there are no major monkey wrenches in the works that would 
> make the
> above simplistic solution not work. And I'm not sure I really 
> want to
> know... Not until I have an actual use case for RefCounted in 
> my own
> code, anyway, since otherwise I wouldn't have any confidence 
> that I was
> making the right decisions in making any changes to it.

I also think it doesn't look like a big job, but I didn't see any 
current activity on the subject and my own immediate priorities 
are elsewhere, hence the simple one-line PR as a stop-gap measure.


More information about the Digitalmars-d mailing list