Re: connection points?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 02/24/04


Date: Tue, 24 Feb 2004 18:20:19 -0500


"Phil Da Lick!" <kjhgjhfgfdjgkjkhfdghhjfd@hkfhkgjfdhhfdg.spam> wrote in
message news:qbQ_b.11518$Y%6.1097385@wards.force9.net...
> "Igor Tandetnik" <itandetnik@mvps.org> wrote in message
> > What if the client still holds an interface pointer of the element?
You
> > can't have an element destroyed, or the client will crash the moment
it
> > calls anything through that pointer.
>
> erm I think I'm getting confused about your terminology now, as I did
when I
> read up on connection points. Basically I have an object which holds a
list
> [collection] of other objects. The list is not incredibly dynamic, and
all
> add/remove functions will go through the parent object. When the
parent
> object dies, all children die. No child will die before the parent
unless it
> is the result of a proper delte operation within the parent's list
> functions. No child object exists before the parent is created.

I'm describing a situation like this:

Dim coll as MyCollection
Dim elem as MyElement

Set coll = ... ' initialized somehow
Set elem = coll.Item(0)

Set coll = Nothing
' At this point, there are no more references on MyCollection object.
' Does it get destoyed, and if so, what happens to its elements?

elem.SomeProperty = "abcd"
' If on the previous line the collection was destroyed with all its
elements,
' the client is in trouble here

-- 
With best wishes,
    Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Relevant Pages

  • Re: Sub Form specific values
    ... I assume there is no parent - child relationship between the data in the ... Users need the option to update client or not. ... "Jeanette Cunningham" wrote: ... Tell us more about your parent form and subform. ...
    (microsoft.public.access.formscoding)
  • Re: Summing hierarchical data SQL
    ... an *efficient* query without a correlated subquery. ... id, name, parent, frequency, ... Sure one can optimize the original query by factoring out the subquery ... 500 bytes received via SQL*Net from client ...
    (comp.databases.oracle.misc)
  • Re: Using macros to permit updating of subform
    ... because I am confused on the terms main and parent. ... a parent subform linked to the Combo Box form and then I have a child subform ... > or add a new parent record with or without adding new child records for it. ... >> problem is that when I enter a new Client record with a new Activity ...
    (microsoft.public.access.macros)
  • Re: Help on delagate strange behaviour ???
    ... "Doker" wrote: ... register to the so called Client class which raise the events but this is not ... other assembly (The "parent") whcih is the only interface that my final user ... Because Child object definded in Parent one is not the same one defined ...
    (microsoft.public.dotnet.general)
  • Re: [REPORT] cfs-v4 vs sd-0.44
    ... I think that during a fork, the parent has a higher probability of forking other processes than the child. ... Maybe a way to pass CPU time over a UNIX socket, along with information on what process/user passed it That would make it possible to really fix X properly on a local system. ... Ordinarily X would nice all of its client service threads to +10, but when a client passes CPU time to its thread over the socket, then its service thread temporarily gets the scheduling properties of the client. ...
    (Linux-Kernel)