realbasic-nug
[Top] [All Lists]

Correct behaviour of ATSUTextLayoutMBS.Release ?

To: Realbasic NUG Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Correct behaviour of ATSUTextLayoutMBS.Release ?
From: Paul Howson <phowson-lists at flexi dot net dot au>
Date: Mon, 31 May 2004 05:23:18 +1000
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
A question for Christian Schmitz (or anyone else who knows the answer):

The MBS docs say that ATSUTextLayoutMBS.Release determines
"Whether the destructor will release the handle."

However this code:

dim t as ATSUTextLayoutMBS
t = new ATSUTextLayoutMBS
t.Create
t.Release = true

Causes the t.LastError property to immediately become -8790, which is
"kATSUInvalidTextLayoutErr "

The docs suggest that setting t.Release = true should not have any effect
until the destructor of the ATSUTextLayoutMBS class is called.

It is therefore not clear what is happening. Does the Release method release the handle straight away? If Release is not set to true, does this mean that the toolbox ATSUTextLayout structure is not released when the ATSUTextLayoutMBS dies, hence causing a memory leak?

What is the correct way of using this Release method?

Paul Howson.

----------------------------------------------------------------
The Design Group Qld, Warwick Qld Australia
web: www.tdgq.com.au  email: paul at tdgq dot com dot au

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • Correct behaviour of ATSUTextLayoutMBS.Release ?, Paul Howson <=