[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Fri Sep 24 21:28:23 2004 -->
- <!--x-from-r13: wbuazvyyf ng fcrnxrnfl.arg (Xbua [vyyf) -->
- <!--x-message-id: Pine.LNX.4.44.0409242010240.13352-[email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] C++ Debuggery and the Path of Destruction -->
- <li><em>date</em>: Fri Sep 24 21:28:23 2004</li>
- <li><em>from</em>: johnmills at speakeasy.net (John Mills)</li>
- <li><em>in-reply-to</em>: <<a href="msg00844.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] C++ Debuggery and the Path of Destruction</li>
Thanks for the input.
On Fri, 24 Sep 2004, Barry Rountree wrote:
> On Friday 24 September 2004 08:41 pm, John Mills wrote:
> > Naturally, I got a bit too clever
> It's almost certainly going to be easier to rewrite it as something less
> clever, but hey, where's the fun in that?
Yes, well there is that aspect. I've been at this long enough to know I'm
creating a maintenance headache, though, and less clever would be smarter.
The ostensible reason is I am allocating image buffers that are passed on
to an unknown number of asynchronous clients. I store them in a ring that
[hopefully] has enough slots so even a slow client will have time to send
the newest buffer before it is trashed in favor of a yet newer image (4 or
5 down the line). That code is very simple and works fine. The alternative
seemed to be copying each buffer for each client to which it's due, which
I wanted to avoid.
> Any chance of posting some code?
I will if I come up with a simple example. Right now the mechanics obscure
the problem - even for the benighted author. &8-)
> You can also try zeroing out the object's memory during destruction -- that
> might let you segfault a bit sooner at a more useful location.
Sounds like a useful idea, and easy to do.
> Combine the two and you should see an object getting freed that is later
> referenced.
Good point.
Thanks.
- John Mills
john.m.mills at alum.mit.edu
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00848" href="msg00848.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00844" href="msg00844.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
<ul><li><em>From:</em> rountree at cs.uga.edu (Barry Rountree)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00844.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00846.html">[ale] Linux Mail Server Recomendations</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00844.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00848.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00845"><strong>Date</strong></a></li>
<li><a href="threads.html#00845"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>