' *** GARBAGE.GFA *** ' ' *** Garbage collection is fatal if garbage contains a string of 32767 bytes. ' *** In compiled program a garbage-string of 32767 bytes is not deleted at all ' *** GFA 3.07 & 3.5E: hang-up; compiled: garbage not collected ' CLS ' PRINT PRINT " Free memory is now: ";FRE();" bytes." s$=STRING$(32767,0) ! maximum string-length of 32767 bytes PRINT PRINT " After creating a string of 32767 bytes we are left with: ";FRE();" bytes." PRINT s$="" PRINT " The string is deleted (now null-string), but the old string is now left as" PRINT " garbage. Free memory is: ";FRE();" bytes." PRINT PRINT " We will force a garbage collection with FRE(0), but unfortunately this will" PRINT " completely hang up your ST if this is run from the interpreter. Press" PRINT " any key if you are ready..." ~INP(2) ~FRE(0) PRINT PRINT " This is only printed if compiled (unless you changed the string-length to a" PRINT " smaller number). Just for the record, we have now: ";FRE();" bytes. If this" PRINT " program was compiled, you'll notice that the garbage of the old string is not" PRINT " collected at all." ' ~INP(2) CLS