Fix memory leaks.
authorBen Pfaff <blp@gnu.org>
Tue, 1 Jun 2004 04:57:11 +0000 (04:57 +0000)
committerBen Pfaff <blp@gnu.org>
Tue, 1 Jun 2004 04:57:11 +0000 (04:57 +0000)
commit06f9ee45954e5e71fa7f6262dbf37defa1dbf996
tree6a58c5c5db5224ba3f0aa6b84fddaee7f7f139ee
parent92bfefccd465052e492f669ce561aa25b0110283
Fix memory leaks.

Generalize casefiles to the extent that we can use them for sorting
and other kinds of data transformations.  Change cases to be
copy-on-write to improve memory efficiency in common cases.  Every
access to a member of a `struct ccase' was changed to be a call to a
case_*() function, especially case_data(), case_num(), case_str(), or
case_data_rw().  Many instances of a local variable named "case_num"
were changed to "case_idx" as a consequence.  Many `struct ccase *'
were changed to actual `struct ccase' because of copying semantics of
cases.  In several places there was a choice between updating debug
code to work with the new ADTs or just deleting it because it was
useless; I chose to delete it.

The workspace idea didn't work out.
68 files changed:
ChangeLog
TODO
configure.ac
src/ChangeLog
src/Makefile.am
src/aggregate.c
src/alloc.c
src/alloc.h
src/autorecode.c
src/case.c [new file with mode: 0644]
src/case.h [new file with mode: 0644]
src/casefile.c
src/casefile.h
src/compute.c
src/count.c
src/crosstabs.q
src/data-list.c
src/descript.c
src/dfm.c
src/dictionary.c
src/do-if.c
src/expr-evl.c
src/expr-prs.c
src/expr.h
src/exprP.h
src/file-type.c
src/flip.c
src/formats.c
src/frequencies.q
src/get.c
src/inpt-pgm.c
src/levene.c
src/lexer.c
src/list.q
src/loop.c
src/matrix-data.c
src/means.q
src/mis-val.c
src/pfm-read.c
src/pfm.h
src/print.c
src/recode.c
src/repeat.c
src/sample.c
src/sfm-read.c
src/sfm.h
src/sort.c
src/sort.h
src/t-test.q
src/tab.c
src/var-labs.c
src/var.h
src/vars-atr.c
src/vars-prs.c
src/vfm.c
src/vfm.h
tests/ChangeLog
tests/bugs/t-test-with-temp.sh
tests/command/t-test-1-indep-val.sh
tests/command/t-test-1-sample-missing-anal.sh
tests/command/t-test-1-sample-missing-list.sh
tests/command/t-test-1s.sh
tests/command/t-test-groups.sh
tests/command/t-test-indep-missing-anal.sh
tests/command/t-test-indep-missing-list.sh
tests/command/t-test-paired-missing-anal.sh
tests/command/t-test-paired-missing-list.sh
tests/command/t-test-pairs.sh