better not to null it unless absolutely sure at a level of work V. is
trying to get you to do
best is to use onPreExecute and onPostExecute as shown by Skyler a
while back and as well since this is Mult-Thread and that is dicey
without correct code then one approach is to syncronize( ObjectRef )
{ /* code goes here */ } on the object that is passed to the
background in -->both<-- the background and forground thread but since
we neither write the scheduler nor have reliable compliance with
comparability definition is is assured that without ultra-careful
attention to detail then one day some way somewhere some device hangs
or gives problems
do what Kostya Vasilyev suggests and study AbstractInputMethodService
then run tests on local as sometimes random calls will give additional
design avenues
On Nov 18, 9:40 pm, Bluemercury <[email protected]> wrote:
> Hi there! Sorry for posting here again, but i was hoping if i could try
> this sample, you said to put the synchronized in the detach method here:
>
> void detach() {
> *activity=null;*
>
> }
>
> in the asynctask, is this correct?but detach() is only called in the
> activity and not the in the async task itself, i thought synchronized
> methods assumed that they're both launched from 2 different threads....but
> in this case the activity(UI thread) calls the detach method like you said,
> but the async task doesnt, only the attach method...
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en