Updated Instance Allocation (markdown)

Lior Halphon 2024-11-24 22:07:41 +02:00
parent 79e3cbdd03
commit 89582e33df
1 changed files with 1 additions and 1 deletions

@ -42,7 +42,7 @@ my_custom_free(gb);
```
Using `GB_allocation_size` you can obtain the required buffer size for an instance, which can then be used to allocate a buffer for it using any arbitrary allocation method.
Additionally, `GB_is_inited` will return `true` if a [[GB_gameboy_t]] instance is initialized in a given buffer. If an instance is allocated in such before, it must be first freed with `GB_free` or `GB_alloc` before being deallocated.
Additionally, `GB_is_inited` will return `true` if a [[GB_gameboy_t]] instance is initialized in a given buffer. If an instance is allocated in such before, it must be first freed with `GB_free` or `GB_dealloc` before being deallocated.
## Thread Safety
`GB_free` and `GB_dealloc` must not be called if the instance is being run in any thread, including the current one (via a callback).