Pointer problems, changing for no reasons

Begah via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 10 00:28:44 PDT 2016


On Thursday, 9 June 2016 at 19:00:42 UTC, cy wrote:
> I can't help but notice that loadModel is not a static member 
> function, yet you don't seem to call it with a Model object in 
> your "get" function.
>
> Also have a look at std.typecons.RefCounted if you want 
> reference counted data..

loadModel is not a method, it is a function. Being a function it 
doesn't have a 'this' so doesn't need to be called with an object.
Also, i tried using std.typecons.RefCounted but i didn't like the 
lack of control i had over it ( refCount is private and only has 
a getter method ).


More information about the Digitalmars-d-learn mailing list