[PATCH 1/8] riched20: Stub for ITextRange interface and implement ITextDocument::Range. (resend try 4)
huw at codeweavers.com
Thu Sep 11 09:15:47 CDT 2014
On Thu, Sep 11, 2014 at 10:01:51PM +0800, Jactry Zeng wrote:
> Hi Huw,
> 2014-09-11 19:55 GMT+08:00 Huw Davies <huw at codeweavers.com>:
> > This looks very suspicious to me. You're storing a reference to
> > 'reOle' so you should AddRef it somewhere. It may be better to pass
> > the interface ptr, AddRef and store that.
> > Also, is the purpose of rangelist just to be able to NULL out reOle
> > when the parent object is destroyed? If so, this can go away if you
> > correctly handle the ref counting.
> Thanks for your review!
> I have tested ref count of reOle/txtDoc in Windows, and ref count
> of reOle/txtDoc didn't increase after ITextDocument::Range. So I didn't
> call AddRef in ITextDocument::Range.
An obvious question is then: what happens to the range object if you
release all references to the txtdoc object? Does the range object
still remain functional?
More information about the wine-devel