gir.core icon indicating copy to clipboard operation
gir.core copied to clipboard

Improve struct freeing

Open badcel opened this issue 2 years ago • 0 comments

See: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/365

Use this to automatically generate a Copy and Dispose method.

this behavior must be implemented in an optional way. If it is missing there must be some fallback mechanic.

Those functions are especially useful if a record is not part of the type system (does not have a get_type function) and thus is not boxed and can not be automatically copied / freed through the type system.

Nevertheless it should be implemented for all record types as copy / free via the type system is considered expensive as it requires a lookup of the type in the native type dictionary.

  • [x] add method to verify format (parameter / return type) of record function as a duplicate must be rendered #1072
  • [x] Support opaque untyped records #1072
  • [ ] Support opaque typed records #1088
  • [ ] Support typed records
  • [ ] Support UntypedRecords

Consider for all implementations

  • implement I disposable on all record types using free-func
  • generate info log for types which would benefit from an upstream annotation

badcel avatar Jan 05 '23 17:01 badcel