www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Reference counting

reply Qian Xu <quian.xu stud.tu-ilmenau.de> writes:
Hi All,

is it possible to see the reference counting of a char[]?

I have some problems with PullParser (tango). 
I put an assertion here:
-----------------------------------------------------------------------------
        private XmlTokenType doAttributeName()
        {
                auto p = text.point;
                auto q = p;
                auto e = text.end;

                assert (p < e, "No!!! text.point is after text.end!!");
                
                char[] tmp = "";
                while (*q > 63 || text.attributeName[*q])
-----------------------------------------------------------------------------

The assert will be broken 1-2 times, when I run a same test 1000 times.

So I want to know about the inside world of D-Compiler.


Best regards
--Qian Xu
Mar 02 2009
parent reply BCS <none anon.com> writes:
Hello Qian,

 Hi All,
 
 is it possible to see the reference counting of a char[]?
 
Almost certainly no. D Uses a mark-and-sweep GC not a ref counting one, so there isn't a reference count.
Mar 02 2009
parent reply Qian Xu <quian.xu stud.tu-ilmenau.de> writes:
BCS wrote:
 Hello Qian,
 
 Hi All,

 is it possible to see the reference counting of a char[]?
Almost certainly no. D Uses a mark-and-sweep GC not a ref counting one, so there isn't a reference count.
sorry to have heard about that. I am now suffering from debugging D programs in linux (opensuse). -- Xu, Qian (stanleyxu) http://stanleyxu2005.blogspot.com
Mar 02 2009
parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Mar 2, 2009 at 5:56 PM, Qian Xu <quian.xu stud.tu-ilmenau.de> wrote:
 sorry to have heard about that.
 I am now suffering from debugging D programs in linux (opensuse).
Yeah, I hear a lot of people suffer from that these days ;)
Mar 02 2009