-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix mac os memory leak #33
Merged
Merged
Commits on Jul 28, 2021
-
TLDR; I did not find an easy way to clean up NSArray, but there is a better option to get NSString from pasteboard - stringForType. Next up. Even if send release to NSString, there are leftovers after conversion NSString to Rust string. Right now, conversion happens in INSString.as_str(), which internally uses NSString.UTF8String. UTF8String, according to Apple docs, is a pointer lifetime of which is less or equal NSString. This is not true if the clipboard contains characters outside the ASCII range. That's why nsstring_to_rust_string function. I tried to describe the full process here https://barhamon.com/post/rust_and_nsstring
Sergey Bargamon committedJul 28, 2021 Configuration menu - View commit details
-
Copy full SHA for d828189 - Browse repository at this point
Copy the full SHA d828189View commit details -
Sergey Bargamon committed
Jul 28, 2021 Configuration menu - View commit details
-
Copy full SHA for 063c2a8 - Browse repository at this point
Copy the full SHA 063c2a8View commit details -
add spaces after double slash (nightly rustfmt complains about them)
Sergey Bargamon committedJul 28, 2021 Configuration menu - View commit details
-
Copy full SHA for fba91c2 - Browse repository at this point
Copy the full SHA fba91c2View commit details -
Okay. I give up. Installed nightly toolchain
Sergey Bargamon committedJul 28, 2021 Configuration menu - View commit details
-
Copy full SHA for 09d4d74 - Browse repository at this point
Copy the full SHA 09d4d74View commit details
Commits on Oct 2, 2021
-
This should be done at rust_objc_fondation. Updating original pull request, just in case it need to be fixed right now
Sergey Bargamon committedOct 2, 2021 Configuration menu - View commit details
-
Copy full SHA for ca814d3 - Browse repository at this point
Copy the full SHA ca814d3View commit details -
Sergey Bargamon committed
Oct 2, 2021 Configuration menu - View commit details
-
Copy full SHA for f94e57d - Browse repository at this point
Copy the full SHA f94e57dView commit details -
Sergey Bargamon committed
Oct 2, 2021 Configuration menu - View commit details
-
Copy full SHA for 120a014 - Browse repository at this point
Copy the full SHA 120a014View commit details
Commits on Oct 12, 2021
-
wrap NSString we got from pasteboard into objc_id::Id
Since we get our string from pasteboard, we need to inform objc runtime that we finished using it. We can do it by ourselves by sending the release message or use Id::from_retained_ptr, and Id will release that NSString when it goes out of scope.
Sergey Bargamon committedOct 12, 2021 Configuration menu - View commit details
-
Copy full SHA for 740055c - Browse repository at this point
Copy the full SHA 740055cView commit details
Commits on Oct 15, 2021
-
get rid of memory leak with autoreleasepool
Sergey Bargamon committedOct 15, 2021 Configuration menu - View commit details
-
Copy full SHA for 5923b2a - Browse repository at this point
Copy the full SHA 5923b2aView commit details
Commits on Oct 17, 2021
-
Sergey Bargamon committed
Oct 17, 2021 Configuration menu - View commit details
-
Copy full SHA for 314e4a2 - Browse repository at this point
Copy the full SHA 314e4a2View commit details
Commits on Oct 19, 2021
-
Sergey Bargamon committed
Oct 19, 2021 Configuration menu - View commit details
-
Copy full SHA for bb033c6 - Browse repository at this point
Copy the full SHA bb033c6View commit details -
Sergey Bargamon committed
Oct 19, 2021 Configuration menu - View commit details
-
Copy full SHA for 1558d31 - Browse repository at this point
Copy the full SHA 1558d31View commit details
Commits on Oct 20, 2021
-
put use crate::common::*; back
Sergey Bargamon committedOct 20, 2021 Configuration menu - View commit details
-
Copy full SHA for 34c0d76 - Browse repository at this point
Copy the full SHA 34c0d76View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.