If you notice the implementation of ``M\ object dispose``:
```
M: object dispose [ t >>disposed dispose* ] unless-disposed ;
```
That hints at a ``disposed`` slot. Well, really that should be a method on
``disposable`` but there is one place where we take advantage of the
"requirement" for a slot that tracks if it was disposed previously or not
and calls ``dispose*``.
So basically, if you're a ``disposable`` and you have a slot that tracks
"was I previously disposed or not" then you can implement ``dispose*``
otherwise, you should provide a proper implementation of ``dispose``.
On Tue, Jun 21, 2016 at 2:54 PM, Alexander Ilin <ajs...@yandex.ru> wrote:
> Hello!
>
> I'm trying to get a grip on the destructors vocab.
>
> Looking at the bottom of the "\ dispose help" page I see things like:
>
> M: filter-writer dispose stream>> dispose ;
>
> or
>
> M: decoder dispose stream>> dispose ;
>
> Shouldn't ALL the objects inheriting from disposable override the
> dispose* method instead?
>
> In which cases do I want to override dispose*, and in which cases plain
> dispose is the correct choice?
>
> Please, help.
>
> ---=====---
> Александр
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk