|
From: Jim U. <ji...@3e...> - 2004-03-12 05:39:55
|
At 09:59pm on 2004 March 11, Dan Potter did write: > I've run into a bit of a quandary when integrating Lua to my C++ code (and > this will probably be true of integrating almost any scripting language, to > some degree). Basically I'd like to be able to provide alternate refcnt'ing > semantics to some types of objects. The most straightforward way to do this > would be to make ref() and unref() virtual methods. I doubt you'd see any noticable performance impact from virtual functions unless you're calling them in a time-critical section. Memory, maybe. Won't most calls to unref() result in an expensive delete, outweighing the virtual lookup anyway? Anyway your Tsunami usage is surely more complicated than anyone else's, so if it works for you... -- "closing my eyes, i got a glimpse of several entities moving in front of a giant complex control panel. the creatures were bipedal and of about human size. it was impossible to say more other than they did not move like the giant insect creatures i have seen clearly under the influence of stropharia mushrooms." -- zarkov, "a hit of dmt 10/9/84" ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710 |