Re: g_object_class_install_property, but no g_object_class_remove_property



On Wed, 2 Mar 2005, Stefan Kost wrote:

hi,

is there a logical reson against having g_object_class_remove_property() as well. I looked at the code. g_object_class_install_property() uses g_param_spec_pool_insert() and there is a matching g_param_spec_pool_remove(), so should be fairly easy to be done.

My scenario. For GStreamer I would like to do musical instrument plugins. An instrument can have multiple voices.
Properties are e.g.

properties common to all voices:
waveform, filter-type, ...
properties per voice
note_%02d, volume_%02d, ...

Means, I would like to add the same set of properties a multiple times (thus the number post fix). While I can do that, I cant easily get rid of them. I would like to avoid calling
g_param_spec_pool_remove() myself.

you can't call g_param_spec_pool_remove() yourself because the pool handle used
for class pspecs is not exposed by GObject and deliberately so.
class pspec removal logic is not in place by design, GObject and code based on
it should not have to deal with the complexity involved in having pspecs be
removed during a class' or object's life time.

Any comments.

Stefan

---
ciaoTJ



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]