You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/mods/E-rust-for-systems/topics/ffi/exercises/qoi-bindgen/description.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ In this exercise, we test if the image crate produces the same results when deco
8
8
9
9
The QOI C library is a header-only library, which means the function implementations are included within the header file instead of in a separate C file. We've added a separate C file which includes the header to make it easier to compile and include the library in our Rust program.
When working with data from C, we are responsible for deallocating the memory once we are done using it. Some C libraries might provide a separate function to clean up data structures. For QOI, we instead have to call `libc::free` to free the memory, as indicated by the documentation of the `qoi_read` function:
128
128
> The returned pixel data should be free()d after use.
129
129
@@ -149,7 +149,7 @@ To make sure someone using our wrapper does not forget to free the memory, we ca
0 commit comments