On Thu, 11 Jul 2013 20:46:15 +0900 Dietrich Bollmann <dietr...@formgames.org> wrote:
> [An answer to my own posting - I hope this is helpful for others with > similar problems] > > Hi, > > Here how I finally solved the problem and wrapped the C++ class (sorry for > the long delay): > [...] That is pretty nice and clean, thanks for following-up this thread; Perhaps a few reminders, if performance is an issue (it might not matter, depending, and are not only addressed to you, but may also serve in the mail archive under this thread): - Functions might be faster than methods (although there also is the concept of sealed classes, which could also help) - MAKE-CUBE (or a variant) could potentially instanciate the object without adding an implicit finalizer, with a corresponding WITH-CUBE or WITH-OBJECT macro responsible for finalization in UNWIND-PROTECT. If I remember the implicit finalization system may be slower (probably a good idea to test instead of trusting my word on this). WITH-* style macros are also a very common lispy interface, require very few indentation and permit explicit, immediate finalization as an option. - Alternatively, instead of full finalization+delete/free in WITH-*/GC, objects could potentially be finalized then cached as slab allocators do; this will help if objects are complex and part of the instanciation+initialization can be preserved. -- Matt ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list