Re: Material tables with .fl

New Message Reply Date view Thread view Subject view Author view

Eric S. Hirschorn (erich++at++pike.cecer.army.mil)
Sat, 12 Aug 1995 14:01:41 -0500 (CDT)


On second thought, I see why there is a memory leak in the code snippet
I posted previously.

> >3) Grab pointers to pfMaterials from a *pfGeode , i.e.
> >
> > mtl = pfNewMtl(NULL);

At this point, mtl points to a pfMaterial structure created in the
HEAP.

>
> Creating a new material here is unneccesary. This code snippet
> is actually a memory leak.
>
> > mtl = pfGetGStateAttr(pfGetGSetGState(
> > pfGetGSet(pgeode, 0)), PFSTATE_FRONTMTL);

At this point, mtl points to the material info for the object, which
I presume is located somewhere in shared memory. So the memory in
HEAP has been allocated but there is no way to access it.

Eric

_____________________________________________________________________
Eric S. Hirschorn, USACERL VE Group, EMAIL: erich++at++pike.cecer.army.mil
TEL: (800) USA-CERL ext. 6363 or 7528, FAX: (217) 373-6724


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:47 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.