ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/freeobjmem.c
(Generate patch)

Comparing ray/src/rt/freeobjmem.c (file contents):
Revision 2.7 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.9 by greg, Mon Dec 9 17:56:25 2013 UTC

# Line 12 | Line 12 | static const char      RCSid[] = "$Id$";
12   #include "ray.h"
13   #include "otypes.h"
14   #include "rtotypes.h"
15 + #include "bsdf.h"
16   #include "face.h"
17   #include "cone.h"
18   #include "instance.h"
# Line 21 | Line 22 | static const char      RCSid[] = "$Id$";
22   #include "mesh.h"
23  
24  
25 < extern int
25 > int
26   free_os(                        /* free unneeded memory for object */
27 <        register OBJREC *op
27 >        OBJREC  *op
28   )
29   {
30          if (op->os == NULL)
# Line 67 | Line 68 | free_os(                       /* free unneeded memory for object */
68   }
69  
70  
71 < extern int
71 > int
72   free_objs(              /* free some object structures */
73 <        register OBJECT on,
73 >        OBJECT  on,
74          OBJECT  no
75   )
76   {
77          int     nfreed;
78 <        register OBJREC *op;
78 >        OBJREC  *op;
79  
80          for (nfreed = 0; no-- > 0; on++) {
81                  op = objptr(on);
# Line 85 | Line 86 | free_objs(             /* free some object structures */
86   }
87  
88  
89 < extern void
89 > void
90   free_objmem(void)                       /* free all object cache memory */
91   {
92          free_objs(0, nobjects);
93          freedata(NULL);
94          freefont(NULL);
95 +        SDfreeCache(NULL);
96   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines