-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add memory init/shutdown in android libs #3397
Merged
mspang
merged 1 commit into
project-chip:master
from
andy31415:01_fix_mem_init_in_android
Oct 22, 2020
Merged
Add memory init/shutdown in android libs #3397
mspang
merged 1 commit into
project-chip:master
from
andy31415:01_fix_mem_init_in_android
Oct 22, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullapprove
bot
requested review from
BroderickCarlin,
bzbarsky-apple,
chrisdecenzo,
hawk248,
jelderton,
mspang,
pan-apple,
rwalker-apple and
saurabhst
October 22, 2020 17:00
This is a general problem; iOS CHIPTool is running into this too. I filed #3398 to sort it out. |
bzbarsky-apple
approved these changes
Oct 22, 2020
rwalker-apple
approved these changes
Oct 22, 2020
saurabhst
approved these changes
Oct 22, 2020
vidhis88
approved these changes
Oct 22, 2020
Does #3399 override this change? |
mspang
approved these changes
Oct 22, 2020
mspang
added a commit
to mspang/connectedhomeip
that referenced
this pull request
Oct 22, 2020
This needs a re-think; there are several problems currently: - refcounting of objects with static storage duration - refcounting of objects with automatic storage duration (stack objects) - refcounting of subobjects - including multiple base class subobjects (diamond inheritance) The majority of current uses are in contexts where lifetime could not be extended by reference counting and in general, the initial reference is not dropped. The remaining case looks like a case of unique ownership. If delegate interfaces really need to be refcounted, we'll need to ban multiple inheritance of them (without resorting to virtual inheritance). Reland with some #include needed after project-chip#3397. fixes project-chip#3348
BroderickCarlin
pushed a commit
that referenced
this pull request
Oct 26, 2020
* Remove refcounting (reland of #3356) This needs a re-think; there are several problems currently: - refcounting of objects with static storage duration - refcounting of objects with automatic storage duration (stack objects) - refcounting of subobjects - including multiple base class subobjects (diamond inheritance) The majority of current uses are in contexts where lifetime could not be extended by reference counting and in general, the initial reference is not dropped. The remaining case looks like a case of unique ownership. If delegate interfaces really need to be refcounted, we'll need to ban multiple inheritance of them (without resorting to virtual inheritance). Reland with some #include needed after #3397. fixes #3348 * Add missing #include <CHIPMem.h> * Add more missing includes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Android crashes on platform allocs because init was never called.
Summary of Changes
add init/shutdown on jvm load/unload for chipcontroller.
NOTE: we assume controller is always added, although technically one could add just the setupparser and things would still crash. For our current purposes though, this seems enough.