At 2001-09-20 02:46, Simon Marlow wrote: >No, it's not safe. The reason is that the compiler can track a >ForeignPtr to discover when it dies, in order to run the finalizer, but >it can't track a Ptr. As soon as you drop all references to the >ForeignPtr then the finalizer will run, even if you converted it to a >Ptr and you're still using it. OK, there are different types of safety. The risk here is that the finalisers may have been called by the time you use the Ptr. But if you don't mind that, for instance, if for some reason the finalisers don't render the Ptr invalid, I assume you can still use the Ptr. -- Ashley Yakeley, Seattle WA _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
- Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- RE: Ptr and ForeignPtr Questions Simon Marlow
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- RE: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- RE: Ptr and ForeignPtr Questions Simon Marlow
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty