File: README.refcount

package info (click to toggle)
xmorph 1%3A20011220
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,468 kB
  • ctags: 1,534
  • sloc: ansic: 16,401; sh: 2,651; makefile: 556; tcl: 516
file content (23 lines) | stat: -rw-r--r-- 659 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

hi

I have modified the meshes code in libmorph to use reference counting

this is good for porting libmorph in python (or any language that
needs garbage collecting) or for easier use in GTK .

this way, a program should call meshAlloc(this) to alloc a mesh, but
call meshUnref(this) to free it.

For this reason the function meshFree is deprecated.

if a program doesnt use reference counting (xmorph doesnt) and uses
meshFree then it should define NDEBUG_LIBMORPH_REF_COUNT or NDEBUG to
avoid the warning

if a program defines
#define LIBMORPH_STRICTLY_REF_COUNT
then the function meshFree will abort if the reference counting is not zero


				A Mennucci