<i>refCounts on PtrSetVar failure</i> status still Open with 4 other changes
by
.
D 2005-10-23T05:42:37
J icomment Logged\sIn:\sYES\s\nuser_id=148712\n\nClarifying\smy\sthoughts:\sthe\sreal\s"bug"\sis\sthat\ssome\sfailure\npaths\sdo\snot\sclear\s0-ref\sobjs,\ssome\sdo\snot.\sThis\smakes\sit\nimperative\sfor\scallers\sto\smanage\sthe\srefCount\sexplicitly.\s\n\nIf\sa\snew\sobj\sis\screated\sby\sthe\scaller\sand\sused\sas\snew\svalue\nwithout\sincrementing\sits\srefCount,\sthe\shandling\sof\serror\nreturns\sis\simpossible\sto\sget\sright:either\syou\sDecrRefCount\nand\scrash\son\serrors\scaused\sby\straces,\sor\syou\sdon't\sand\sleak\nthe\sobj\son\sother\serrors.\n\nMy\spreference\sfor\salternative\s(b)\sis\sthat\sit\sallows\sthe\nfire-and-forget\stechnique:\sjust\scall\se.g.\s\n\s\sTcl_ObjSetVar2(interp,\spart1Ptr,\spart2Ptr,\sTcl_NewObj(),\nflags)\nand\sforget\sall\sabout\sthat\sobject's\sfate\sin\sthe\sknowledge\nthat\sit\swill\sbe\sdisposed\sof\sproeprly\s(as\sis\scurrently\sdone\nin\s\serror\sby\seg\sTcl_AddObjErrorInfo).\n\nMaybe\sa\ssimilar\spolicy\swould\smake\ssense\sfor\sother\ninterfaces,\seg\sTcl_ListObjAppendElement?\n
J login msofer
J mimetype text/plain
J username msofer
K 1334947fffffffffffffffffffffffffffffffff
U msofer
Z 4098129dc946f1e584be2fb89fe20b1e