8000 Make sure ParameterStorageBase also uses shared pointer for Java interface by kwalcock · Pull Request #1576 · clab/dynet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make sure ParameterStorageBase also uses shared pointer for Java interface #1576

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

Merged
merged 1 commit into from
Jan 27, 2021

Conversation

kwalcock
Copy link
Contributor

Its subclasses are marked in dynet_swig.i as using shared pointers:

%shared_ptr(dynet::ParameterStorage)
%shared_ptr(dynet::LookupParameterStorage)

SWIG warns that the base class "is not similarly marked as a smart pointer". The line below quiets the warning and also prevents crahes (because of double deletes?).

%shared_ptr(dynet::ParameterStorageBase)

An issue was filed previously and this will soon link to it.

…rface

Its subclasses are marked in dynet_swig.i as using shared pointers:

```
%shared_ptr(dynet::ParameterStorage)
%shared_ptr(dynet::LookupParameterStorage)
```
SWIG warns that the base class "is not similarly marked as a smart pointer".  The line below quiets the warning and also prevents crahes (because of double deletes?).
```
%shared_ptr(dynet::ParameterStorageBase)
```
An issue was filed previously and this will soon link to it.
@kwalcock
Copy link
Contributor Author

This addresses issue #1502.

@kwalcock
Copy link
Contributor Author

This is failing because of a python configuration issue unrelated to this PR. The configuration should be fixed.

@neubig neubig merged commit 04ffe21 into clab:master Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0