Re: BMidiEndPoint
Jerome Leveque <[email protected]> Thu, 10 Oct 2002 13:07:27 +0200
| Newsgroups | gmane.os.openbeos.midi |
|---|---|
| Message-ID | <2723DB2XRN42XTD8JHB0LJ31GCKFD9.3da55f6f@pile> |
10/10/2002 13:50:42, "Matthijs Hollemans" <[email protected]> a écrit: > >Hi Jerome, > >> Can you explain me what must do BMidiEndPoint::Acquire() and >> BMidiEndPoint::Release() > >From the Be Newsletter Volume 4 Issue 3 (one of the few places where >Midi Kit 2is documented): I just find this document what are the few other places? >"The final thing I want to note about the Midi Kit is the >reference counting scheme. Each MIDI endpoint has a >reference count associated with it, so that the bookkeeping >associated with the endpoints is correct. When you construct >an endpoint, it starts with a count of 1. Once the count >hits 0, the endpoint will be deleted. This means that, to >delete an endpoint, you don't call the delete operator >directly; instead, you call BMidiEndpoint::Release(). To >balance this call, there's also a BMidiEndpoint::Acquire(), >in case you have two disparate parts of your application >working with the endpoint, and you don't want to have to >keep track of who needs to Release() the endpoint." This 2 functions just count up and down? or they make something else? A+ Jerome