-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak occurs when linking against the Objective-C runtime. #75
Comments
This might be because of some ARC shenanigans where the runtime expects ARC to exist, but it's not working as expected? |
Keep in mind that 7376 - 6240 = 1136, so (also doing the other math) one might infer that Objective-C's impact alone (ie: without RocksDB) would be something like:
|
Flags used to link against Objective-C: |
I think that this is because, when I compile the Objective-C and C++ code, I'm compiling it all as C++. In order for my usage of Foundation to be managed by arc, I need to compile the .mm files as Objective-C (which allows for C++ interop) and link the compiled objects against the compiled C++ objects. The solution to this problem, if my guess is correct, will probably mostly be in CMake. |
Fixed in 0e806ef |
Given code that (literally) just links against osquery, here are some interesting valgrind results:
With neither RocksDB or Obj-C:
With RocksDB:
With RocksDB and Obj-C:
The text was updated successfully, but these errors were encountered: