[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libftdi
Subject:    How should Ftdi::List and Ftdi::Context lifetimes be managed?
From:       Owen <ellbur () gmail ! com>
Date:       2015-12-03 2:41:03
Message-ID: CALCtWxLJKQMj3tHRtjn=Mcf1PN_6VBfEU7UgRjpZTDqTJjwYjA () mail ! gmail ! com
[Download RAW message or body]

Hello,

I have a question about how to properly use Ftdi::List and Ftdi::Context. I
want to make sure that I won't leak memory or double-delete something.

Does deleting an Ftdi::List delete all the Ftdi::Context objects that came
from it, including open ones? So does that mean that contexts individually
should not be deleted? Also should contexts be closed before the list is
deleted?

Also, if I list devices, and I see a list of devices A, B, and C, and I
open only B, does that Ftdi::List existing in memory prevent another thread
from listing and opening A or C?

Best,
Owen


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@developer.intra2net.com   
[Attachment #3 (text/html)]

<div dir="ltr">Hello,<div><br></div><div>I have a question about how to properly use \
Ftdi::List and Ftdi::Context. I want to make sure that I won&#39;t leak memory or \
double-delete something.</div><div><br></div><div>Does deleting an Ftdi::List delete \
all the Ftdi::Context objects that came from it, including open ones? So does that \
mean that contexts individually should not be deleted? Also should contexts be closed \
before the list is deleted?</div><div><br></div><div>Also, if I list devices, and I \
see a list of devices A, B, and C, and I open only B, does that Ftdi::List existing \
in memory prevent another thread from listing and opening A or \
C?</div><div><br></div><div>Best,</div><div>Owen</div></div>

<br><hr><p><b>libftdi</b>&nbsp;-&nbsp;see <a \
href="http://www.intra2net.com/en/developer/libftdi">http://www.intra2net.com/en/developer/libftdi</a> \
for details.<br> To unsubscribe send a mail to <a \
href="mailto:libftdi+unsubscribe@developer.intra2net.com">libftdi+unsubscribe@developer.intra2net.com</a></p>


<br>=



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic