delphi - TObjectList.Clear access violation -


i'm running weird problem large application. make heavy use of tobjectlist storing custom object on them. on large lists im experiencing weird crashes "access violation @ address.. read of address.. " "privileged instruction" , others, when use clear method. i've tracked happen when attempting delete last item in list. i've checked logging contained objects deletion destroy proc, , trying deleting them on own (for := olist.count-1 downto 0 do.. debugmsg('deleting '+inttostr(a)).. olist.delete(a) ), both ways access violation right when deleting last remaining item in list.

this doesnt happen always, cause use clear in other areas, , few different (smaller) lists, @ specific point in app happens.

i've no clue might wrong, there's nothing trying access list during clear, , cointained objects not have access parent objectlist, there has screwing in tobjectlist.delete/clear methods when comes clearing last item.

any suggestions? using delphi xe.

that sounds me you're freeing objects have been freed. track down, download full version of fastmm, add fulldebugmode conditional defines line under project options->delphi compiler , map file option under linking set detailed, , rebuild. (build, not compile.) copy fulldebugmode dll same folder exe , run it. it'll watch memory allocate , free , when try free same object second time, it'll catch , give detailed debug data problem coming from.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -