From: "Craig A. Schultz" <[EMAIL PROTECTED]>
Subject: Inconsistancy in the SDK?
Hi All,
I've been working with the G2 SDK for almost 2 years now and have =
come across something that I always took for granted before but now it =
seems a little strange. The strangeness comes in play during the =
OnPacket() function of the Rendering Plug-ins.
In every instance I can see of an object being passed into an =
interface method, the interface method need only Release() the object if =
it first Addref()'d the object. In the OnHeader() method, the stream =
header, as well as all the property buffers included within it, need not =
be released within the OnHeader() method, unless, again, they were =
Addref()'d. Also, within the OnPacket() method the packet itself need =
not be released but I finally noticed that the buffer included in the =
packet needs to be released. I have always been doing it just because =
that is how it was done in the first samples I used from the SDK and it =
has propagated to all subsequent projects but looking back on it seems a =
little strange.
Has anyone else noticed this or better yet, does anyone have an =
explanation as to why this is so? Is it just a legacy thing so that =
people's code doesn't all of a sudden start leaking memory or is there a =
reason for it that should be intuitively obvious but that I am just too =
thick headed to see?
Craig
Baffled Samurai Coder.
*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites. Archives of RealForum can
be found at http://realforum.real.com
If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:
unsubscribe realforum
or from another account, besides the address you subscribed with:
unsubscribe realforum <[EMAIL PROTECTED]>