Two more bugfixes to KStars

May 31, 2008

Entry Filed under: KStars. Tags: , .

4 Comments Add your own

  • 1. arunchaganty  |  May 31, 2008 at 7:58 pm

    Regd. the 2nd bug fix, doesn’t KDE have a mechanism for taking care of object references? Glib has g_object_ref and g_object_unref, for the same purpose. Also, without looking at the source, the ks_moon is a static *class* variable, does this mean KSMoon is a singleton class? (just out of curiousity), or possibly just the star data is…

    Reply
  • 2. Akarsh Simha  |  June 4, 2008 at 6:14 am

    I don’t think the KDE API has such a mechanism. Actually, it wouldn’t be as important here, because we are using C++ and not C.
    KSMoon is not a singleton class, but has a few static members in it, that describe coeffecients of various terms in a sinusoidal series used to compute the moon’s position (I don’t know the details).
    Interestingly, this concept struck me because of my minor experience with GLib. g_object_ref and g_object_unref was what gave me the idea of adding a reference count.

    Reply
  • 3. Gopala Krishna  |  June 7, 2008 at 10:58 am

    Though KDE doesn’t have the reference counting mechanism directly, its inherited from qt4.
    One of the mechanism is using QSharedData and QSharedDataPointer classes, although the classes primarily are for implicit sharing.

    Secondly, qt4.4 has uncovered its atomic api a bit, which helps in safe reference counting across threads. Here is a link
    http://doc.trolltech.com/4.4/qatomicint.html

    Reply
  • 4. Akarsh Simha  |  June 8, 2008 at 8:52 pm

    Ahh… while I think that QSharedDataPointer etc might help here, I think they are too much of an overkill for something as simple as we required here, as you said. Thanks for the information.

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Pages

a

Archives

Tags

Recent Comments

Srinidhi TR on I’m a fresher joining II…
Pranesh on I’m a fresher joining II…
Akarsh on I’m a fresher joining II…
Srinidhi TR on I’m a fresher joining II…
smruthi on The “Awful”? (nay,…