-
Notifications
You must be signed in to change notification settings - Fork 3
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
PvaClient.destroy not cleaning up properly #30
Comments
On 6/25/19 2:03 PM, Hugo Slepicka wrote:
I followed the PvaClient Get example at examplesJava repository which
was a great introduction to it.
If I do multiple get operations following that procedure, I noticed
that the PvaClient.destroy operation does not fully clean up the
|pvaClient| reference that is kept and subsequent calls to
|PvaClient.get| return the invalid client reference as the |pvaClient|
reference is not null after destroy was called.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30?email_source=notifications&email_token=ABOVBVXZZRXGYYFVTOTZ2GTP4JMX5A5CNFSM4H3K3POKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G3TU4QA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABOVBVVPUK5KLAFSMGE45RTP4JMX5ANCNFSM4H3K3POA>.
If you change
for(i=0; i<num; ++i) {
clientGets[i].delete();
}
to
for(i=0; i<num; ++i) {
clientGets[i].delete();
clientGets[i] = null;
}
Does the problem go away?
or if that does not work
change
public void delete()
{
if(pvaClientGet!=null) pvaClientGet.destroy();
if(pvaClientChannel!=null) pvaClientChannel.destroy();
}
to
public void delete()
{
if(pvaClientGet!=null) pvaClientGet.destroy();
pvaClientGet = null;
if(pvaClientChannel!=null) pvaClientChannel.destroy();
pvaClientChannel = null;
}
|
@mrkraimer where exactly should the changes go? Can you provide a patch file? |
On 6/26/19 6:50 PM, Hugo Slepicka wrote:
@mrkraimer <https://github.com/mrkraimer> where exactly should the
changes go? Can you provide a patch file?
The following shows diffs that should fix the problem
--- a/exampleClient/src/org/epics/exampleJava/exampleClient/Get.java
+++ b/exampleClient/src/org/epics/exampleJava/exampleClient/Get.java
@@ -61,6 +61,8 @@ public class Get
{
if(pvaClientGet!=null) pvaClientGet.destroy();
if(pvaClientChannel!=null) pvaClientChannel.destroy();
+ pvaClientGet = null;
+ pvaClientChannel = null;
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I followed the PvaClient Get example at examplesJava repository which was a great introduction to it.
If I do multiple get operations following that procedure, I noticed that the PvaClient.destroy operation does not fully clean up the
pvaClient
reference that is kept and subsequent calls toPvaClient.get
return the invalid client reference as thepvaClient
reference is not null after destroy was called.The text was updated successfully, but these errors were encountered: