Skip to Content.
Sympa Menu

texmacs-users - Re: Reference counting in TeXmacs

Subject: mailing-list for TeXmacs Users

List archive

Re: Reference counting in TeXmacs


Chronological Thread 
  • From: Leo <address@hidden>
  • To: address@hidden, Salman Khilji <address@hidden>
  • Subject: Re: Reference counting in TeXmacs
  • Date: Tue, 10 Jun 2003 19:44:50 -0400

Salman,
please, read some tutorial texts on reference counting.
Scott Meyers "Effective C++" and "More Effective C++" should help.
You obviously do not understand the concept of object sharing
and multiple references. In regard to couple of your previous emails,
a little bit of tolerance and more friendly attitude would help.

--Leo--


On Tuesday June 10 2003 21:50, Salman Khilji wrote:
> Following up my previous post, I am looking at the reference counting
> mechanism. I suppose I am neglecting something because I fail to
> undersand one thing.
>
> Teh reference count is incremented in the constructor and the equality
> operator and decremented in the destructor of abstract_struct and
> concrete_struct.
>
> When the reference count drops to 0, the object in question is deleted.
> Why do we do this? Notice that to decrement the reference, the
> destructor must be called. The only way to call the destructor is to
> call delete on the object. If you have to delete to object by calling
> delete on the object, then why have reference counting in the first
> place?
>
> I am thinking about that for "my own copy" of TeXmacs, I would get rid of
> basic.hh and remove all the reference counting mechnism. Would I break
> anything by doing this? basic.hh has lots of preprocessor generated code
> some of which I haven't looked at close enough. But I think getting rid
> of macros like "CONCRETE_NULL" would definitely make the code easier to
> understand.
>
>
>
> Salman




Archive powered by MHonArc 2.6.19.

Top of Page