Re: Confusion about splitting classes to allow sharing of resources
- From: Hang Dog <righteous@xxxxxxxxxx>
- Date: Wed, 20 Apr 2005 15:24:05 +0100
m.a.stijnman@xxxxxxxxxxxxxx wrote:
probably should generate an error when the knot vectors are shared. I imagine further that any spline that share a knot vector that is not explicitly expanded (such as Splines for p and q) gets expanded with a default value - or it might be better to require all splines to be given a new value explicitely before more points can be added.
Share the KnotVector class via reference counted pointers. If the reference count is not one when adding a point to a curve then copy the KnotVector and replace the reference pointer in the curve with the copy.
Alternatively avoid all the complication and don't bother sharing. Unless you can share vast numbers of KVs the amount of memory saving will be fairly minimal.
.
- Follow-Ups:
- Re: Confusion about splitting classes to allow sharing of resources
- From: m.a.stijnman@xxxxxxxxxxxxxx
- Re: Confusion about splitting classes to allow sharing of resources
- References:
- Confusion about splitting classes to allow sharing of resources
- From: m.a.stijnman@xxxxxxxxxxxxxx
- Confusion about splitting classes to allow sharing of resources
- Prev by Date: Confusion about splitting classes to allow sharing of resources
- Next by Date: Re: Looking for UML Diagrams exercises + solutions
- Previous by thread: Confusion about splitting classes to allow sharing of resources
- Next by thread: Re: Confusion about splitting classes to allow sharing of resources
- Index(es):
Relevant Pages
|