• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • FMSLogo
  • Code
FMSLogo

FMSLogo Code

A Logo programming environment for Microsoft Windows

Brought to you by: david_costanzo
  • Summary
  • Files
  • Reviews
  • Support
  • Tickets ▾
    • Feature Requests
    • Bugs
    • Support Requests
  • Discussion
  • Code
Menu ▾ ▴
 
  • Browse Commits
  • Browse Files

Commit [r6323]  Maximize  Restore  History

Fix Bug #620; APPLY no longer leaks when running named slot templates.

The fix is not to make LINE nodes when treeifying a procedure.
In the context of a treeified procedure, LINE nodes would create a cycle
that would leak memory unless the procedure is explicitly untreeified.

In the case where APPLY was given named slot templates (a body list),
APPLY creates an anoymous procedure and there's no good place in the
evaluator to untreeify it. In this case, some nodes were leaked.

This was a regression introduced by r1570, when an untreeify_line
was removed from the logic for treeifying a proceedure, following what
UCBLogo does. However, UCBLogo doesn't leak nodes because
it has a mark-and-sweep garbage collector that can handle cycles.

The new fix doesn't re-add the explicit untreeification. Instead, it
extracts a helper function from untreeify_line() that doesn't mark the
line as a TREE or create the cycle. To me, it makes more sense not to
create the cycle than to create a cycle then immediately undo that work.

david_costanzo 2026-07-03

Browse code at this revision

Parent: [r6322]

Child: [r6324]

changed /logo/trunk/src/CHANGELOG.TXT
changed /logo/trunk/src/logocore.h
changed /logo/trunk/src/paren.cpp
changed /logo/trunk/src/test/apply.lgo
/logo/trunk/src/CHANGELOG.TXT Diff Switch to side-by-side view
Loading...
/logo/trunk/src/logocore.h Diff Switch to side-by-side view
Loading...
/logo/trunk/src/paren.cpp Diff Switch to side-by-side view
Loading...
/logo/trunk/src/test/apply.lgo Diff Switch to side-by-side view
Loading...
SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2026 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise

Cerberus Logo