Picking and user data

New Message Reply Date view Thread view Subject view Author view

From: Mark Acosta (macosta++at++magic-earth.com)
Date: 03/06/2001 16:32:02


Hi all,

        Maybe someone can clarify something for me. pfObject::setCopyFunc()
and pfObject::setDeleteFunc() sets copy and delete functions per user data
slot. But, the copy and delete functions don't specify which slot to operate
on. So, I'm assuming that you can't have a single copy or delete function
for all slots since you don't know what slot you're working on. The only
other alternative I can see is to have a separate function for each slot
that's being used. Correct?

        One other thing. I was getting some strange crashes while doing a
channel->pick (). Looking into it further, I found that it was dying while
trying to perform an object copy and, more specifically, trying to unref
some user data it was trying to copy. The strange thing is that the address
it was trying to unref was obviously a stack based address which just
doesn't seem right to me. I tried setting a copy function that just copied
the pointers without the ref/unref and that seemed to get rid of the
crashes. I printed out the user data in the copy routine and I consistently
get stack addresses when I do a pick. Is something in the pick logic setting
stack pointers in user data and is it or is it not wrong to unref/ref an
object on the stack? I thought pfObjects couldn't be created on the stack.

Thanks,

Mark Acosta
Magic Earth, Inc.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Mar 06 2001 - 16:31:40 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.