Losing java references when mapping std::vector::at std::vector::at aka 'get' @ByRef #779
-
Hello all. Is there a way to map get function of std::vector get with @byval annotation instead of @ByRef? For example in the preset You can find the line
Which maps the vector on to It contains the mapped function from std::vector::at as get, like this
My question: is There a way to map this method with @byval instead of @ByRef? I mean to get:
The reason to do this is because I end up losing java references when using the get method in java side with the @ByRef. Or may be there exists a way to keep java-references obtained by this get? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You could insert a |
Beta Was this translation helpful? Give feedback.
You could insert a
@ByVal
method with Info.javaText() I guess, but if you're only worried about the life of the referencePlease try to use PointerScope: http://bytedeco.org/news/2018/07/17/bytedeco-as-distribution/