View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000507 | LDMud 3.5 | LPC Language | public | 2007-08-06 05:56 | 2011-02-20 01:00 |
Reporter | sinnvoll | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | new | Resolution | open | ||
Summary | 0000507: An efun " this_closure() ", that returns in a closure a pointer to the closure. | ||||
Description | It would be nice to have an efun this_closure(), that returns in a closure a pointer to the closure. add_controller("notify_move", function void () { write("Write this only for exact one move."); delete_controller("notify_move",this_closure()); } ); You could code something like this: closure cl; add_controller("notify_move", cl=function void () { write("Write this only for exact one move."); delete_controller("notify_move",cl); } ); But that has the disadvantage of a recursive data structure. The memory might not be freed, if the closure is no longer used, because the reference count can't be nulled because of the self reference. | ||||
Tags | No tags attached. | ||||
duplicate of | 0000288 | new | New efun this_function() |