-----BEGIN PGP SIGNED MESSAGE----- Moin,
On Thursday 11 March 2004 12:30, Vladimir Marek wrote: > > I do have C++ object typemapped into perl class. Then I have two > > functions which creates and destroys that object > If anyone cares, I found different, imho better and easier solution. > Just whenever new object is created, I store to map it's pointer. When > object is destroyed, I delete his pointer from the map. Then I > overloaded the DESTROY method, so that it first check if the pointer is > in the map, and call actual delete(obj) only if it is found. > > Why simple solution is found as the last one usually ? :) Hm, that still sounds way to complicated to me. AFAIK DESTROY() is called only _once_ per object. So why doyou think you need to check the map for the pointer? Why can't you just call delete(obj) from DESTROY() regardless? Best wishes, Tels - -- Signed on Thu Mar 11 18:23:12 2004 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Some spammers have this warped idea that their freedom of speech is guaranteed all the way into my hard drive, but it is my firm belief that their rights end at my firewall." -- Nigel Featherston -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBQFCgiXcLPEOTuEwVAQE4Bwf9HZEAkDJNcN1S41R/DenUWiFHgc2+ZCFT 1WZhrH3naR54IEneGhY/Fon9+bRPJ+yCTB20uBto8VtWpA1KIE9zytIiOnmPoLnp gpOb5tGMdgEpdXq5+rINiOApiRshqe37TOxfLnqch3JmdsJssUYIp4IoKBJIhDJi R8bdZDsoabdG1+xpRebinXacBcHBAW8v1TLggMoP5mg7GGpDHxxA/91OVkYKOQx0 l/kwcOXH834ZmvTloTGSX1y5L2oPap2tD0FgKN79AjUPusa9PvhY+r1BoOr0jCFq PcANzZLkCGrPi4euaYTzBk/YjtPMEE7EG9RZeDJ2yqq77Ger3gVO9w== =4zsc -----END PGP SIGNATURE-----