Denis Koroskin Wrote:
I think RefCounted should be flexible enough to re-usable for other data
structures, too (e.g. so that it could be part of Phobos).
I agree. However this code goes into core, so it can't use Phobos.
By the way, your code has a bug:
Tid tid; // or release() and
I don't think you need opAssign. The compiler will automatically use bitblit
and postblit.
Here's my implementation of a reference counted thread id structure for
comparison:
struct Tid
{
this(HANDLE h)
{
_h = h;
Counter * cnt = cast(Counter *)
On Mon, 30 Nov 2009 03:19:33 +0300, Bartosz Milewski
bartosz-nos...@relisoft.com wrote:
I don't think you need opAssign. The compiler will automatically use
bitblit and postblit.
Here's my implementation of a reference counted thread id structure for
comparison:
struct Tid
{
Don Wrote:
LMB wrote:
[...]
So, is there any complete example on how to implement reference counting in
D2?
I don't think so. While trying to do it, Bartosz found some severe bugs
in D which made it impossible; they were fixed in the last release.
He's since found bug 3516 might
LMB wrote:
Hello,
This should be my first post here, but I just posted the same message on the
standard D newsgroup by mistake (what a noob! :-P) So, here I go again, on
the right forum this time...
I am trying to create yet another D2 wrapper for SQLite. As usual with many C libraries,
Hello,
I've been reading the forums for some time, but this is my first post here :-)
I am trying to create yet another D2 wrapper for SQLite. As usual with many C
libraries, SQLite provides us some objects and functions to create and
destroy them. So, I decided to encapsulate these SQLite
LMB Wrote:
Hello,
[...]
Ouch! I thought I was posting to the learn group. My bad, sorry!
On Sat, 28 Nov 2009 01:27:41 +0300, LMB lmbar...@gmail.com wrote:
Hello,
I've been reading the forums for some time, but this is my first post
here :-)
I am trying to create yet another D2 wrapper for SQLite. As usual with
many C libraries, SQLite provides us some objects and functions
Hello,
This should be my first post here, but I just posted the same message on the
standard D newsgroup by mistake (what a noob! :-P) So, here I go again, on
the right forum this time...
I am trying to create yet another D2 wrapper for SQLite. As usual with many C
libraries, SQLite provides