Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smokku/libgmbus
C Mbus Implementation
https://github.com/smokku/libgmbus
c library mbus message-bus
Last synced: 16 days ago
JSON representation
C Mbus Implementation
- Host: GitHub
- URL: https://github.com/smokku/libgmbus
- Owner: smokku
- License: gpl-2.0
- Created: 2012-11-02T13:16:57.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-11-02T14:21:57.000Z (about 12 years ago)
- Last Synced: 2024-12-10T00:42:44.811Z (24 days ago)
- Topics: c, library, mbus, message-bus
- Language: C
- Size: 207 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: ChangeLog
- License: COPYING
Awesome Lists containing this project
README
Memory Management
-----------------This (should) apply to the memory management used for gmbus:
1. Arguments of API functions
a) the memory of each object passed to the gmbus API is handled by the
library, meaning the memory is freed if gmbus does not need it anymoreb) except, the memory of const objects passed to the gmbus API that is not
freed by the library; if required the library creates its own copy of the
object.c) if the argument is used as an return value (like the GString object passed
to the _read and _as_string functions) it is not freed by the library2. Arguments passed to callback functions
a) The memory of each argument passed to a callback function is handled by
the library, meaning it is allocated and freed. If the
application needs an object after the callback function is passed it has
to create its own copy of the object. If an object is passed on to another
function of the gmbus API within the callback function a copy has to be
created as in this case rule 1a) applies.