Updating documentation on ObjPool_CleanUp function

This commit is contained in:
Kevin Yonan 2019-06-25 09:22:42 -07:00 committed by GitHub
parent 5f5e143a50
commit eda842ccf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,13 +59,20 @@ Explanation & Usage:
``` ```
Deallocation itself is also very simple. Deallocation itself is also very simple.
There's two deallocation functions available:
```c
void ObjPool_Free(struct ObjPool *objpool, void *ptr);
void ObjPool_CleanUp(struct ObjPool *objpool, void **ptrref);
```
`ObjPool_Free` will deallocate the object pointer data back to the memory pool.
```c ```c
ObjPool_Free(&vector_pool, origin); ObjPool_Free(&vector_pool, origin);
``` ```
Like Raylib memory pool, the Raylib object pool also comes with a convenient clean up function that takes a pointer to an allocated pointer, frees it, and sets the pointer to NULL for you! Like Raylib memory pool, the Raylib object pool also comes with a convenient clean up function that takes a pointer to an allocated pointer, frees it, and sets the pointer to NULL for you!
```c ```c
ObjPool_CleanUp(&vector_pool, &origin); ObjPool_CleanUp(&vector_pool, (void **)&origin);
``` ```
Which of course is equivalent to: Which of course is equivalent to: