TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
Matthew Heaney <[log in to unmask]>
Date:
Wed, 3 Mar 1999 21:14:38 -0800
In-Reply-To:
"Lipscomb, Kevin"'s message of "Mon, 1 Mar 1999 11:05:37 -0500"
X-To:
"Lipscomb, Kevin" <[log in to unmask]>
Reply-To:
Matthew Heaney <[log in to unmask]>
Parts/Attachments:
text/plain (39 lines)
My most recent article submission ("Abstract Factory Revisited") to the
ACM patterns archive uses smart pointers for all memory management.

Smart pointers are implemented using reference-counts, so that when
the count drops to zero, the object is automatically returned to a
storage pool.

It's actually more sophisticated than that, because the Free operation
is primitive, and dispatches according to the tag of the object
designated by smart pointer.  Each type in the class implements its own
pool, from which it draws new instances, and to which it returns old
ones.

A rather nice idiom to know, if I do say so myself!

Matt



"Lipscomb, Kevin" <[log in to unmask]> writes:

> My development team is responsible for writing and maintaining applications
> for which high-availability is a requirement.  Once launched, our programs
> should run continuously for days or weeks.
>
> As one might imagine, memory leaks are a great concern to us.  Does anyone
> know of a collection of software components in Ada that provide
> reference-counted objects?  How about bindings, or binding wrappers, that
> provide reference-counting?
>
> In the book, _Design Patterns_, reference-counted objects are covered in the
> section on the pattern Proxy.  Unfortunately, I have not read the entire
> book yet (I will, I promise.)  Can anyone recommend other patterns that are
> particularly applicable in the domain of high-availability software
> applications -- design patterns that we'd really be foolish to be without?
>
> -- Kevin Andrew Lipscomb
> -- CV, PGP keys, etc: http://users.exis.net/~klips

ATOM RSS1 RSS2