Skip to content
  • Sam Thursfield's avatar
    photos-tracker-queue: Keep object alive when init fails · 38c2aa1a
    Sam Thursfield authored
    If init succeeds, we will have one singleton as before.
    If init fails, we will also have one singleton, which will
    return an error any time g_initable_init() is called
    (thanks to 51b22906).
    
    Previously, if init failed, the weak reference would cause the `static
    GObject *self` value inside the constructor function to return to NULL,
    meaning the next call to photos_tracker_queue_dup_singleton() would try
    to initialise Tracker again. In some cases this could result in a very
    slow startup.
    38c2aa1a