[
https://issues.apache.org/jira/browse/IGNITE-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15366157#comment-15366157
]
Igor Sapego commented on IGNITE-1443:
-------------------------------------
Vladimir,
1-2) I was thinking about that too and I believe the most convenient solution
for user here would be a shared/weak pointers. All other solutions seem to be
both error-prone and non-convenient in some cases. However, we definitely
should not accept pointers and deleters. I believe the solutions from which we
should choose are either keeping references (current variant) which can cause
dangling reference problem or copying on pass, which is safe enough, but
requires for the listener to be copy-constructible. We can also provide both
methods for the user to choose (add argument - {{bool copy}}).
3) If this is the case here then should I say that in C++ it is common practice
to accept anything that can be called. This will automatically allow for
functions, but in this case event listener classes would be required to define
{{operator()}} instead of {{OnEvent()}} method. Of course, we can also just add
it as an option, without changing existing API.
> CPP: Implement cache continuous queries.
> ----------------------------------------
>
> Key: IGNITE-1443
> URL: https://issues.apache.org/jira/browse/IGNITE-1443
> Project: Ignite
> Issue Type: Task
> Components: platforms
> Affects Versions: 1.1.4
> Reporter: Vladimir Ozerov
> Assignee: Igor Sapego
> Fix For: 1.7
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)