This counter is necessary, when the application makes use of multiples libraries each dependent of libinstpatch. Examples:
Swamiis dependent of libinstpatchand fluidsynth. fluidsynthcould be optionally dependent of libinstpatch. In this case libinstpatchis owned twice (by swamiand by fluidsynth).
For an application only dependent of fluidsynth, libinstpatchis only owned by fluidsynth.
For an application only dependent of libinstpatch, libinstpatchis only owned by this application.
This counter ensures that internal initialization(or deinitialization) is done only one time.
This is required because libinstpatchis dependent of GObject which doesn't accept that the same Gtype be registered multiple times.
This counter is necessary, when the application makes use of
multiples libraries
each dependent oflibinstpatch
. Examples:Swami
is dependent oflibinstpatch
andfluidsynth
.fluidsynth
could be optionally dependent oflibinstpatch
. In this caselibinstpatch
is owned twice (byswami
and byfluidsynth
).fluidsynth
,libinstpatch
is only owned byfluidsynth
.libinstpatch
,libinstpatch
is only owned by this application.This counter ensures that internal
initialization
(ordeinitialization
) is done only one time. This is required becauselibinstpatch
is dependent ofGObject
which doesn't accept that the sameGtype
be registered multiple times.