Re: AbiSource, Ispell, Aspell, take 2


Subject: Re: AbiSource, Ispell, Aspell, take 2
From: Thomas Fletcher (thomasf@qnx.com)
Date: Mon Mar 06 2000 - 06:56:07 CST


On Sun, 5 Mar 2000, Kevin Atkinson wrote:

> Here is a better description of my proposed library with sudo examples.
>
> Please give lots of feedback thanks.
>

[Sections 1-2 snipped]

> 3 Usage
>
> When your application first starts you should get a new configuration
> class with the command:
>
> PspellConfig * spell_config = new_pspell_config();
>
> which will create a new PspellConfig class. It is allocated with new
> and it is your responsibility to delete it with delete (not free).

[More stuff talked about ...]

> Finally, when the document is closed the PspellManager class should be
> deleted like so.
>
> delete spell_checker;
>
> Do not use free as it is not allocated with malloc.

May I recommend that since you have a construction function
(rather than just instantiating the class) that you also
have a destruction function:

        destroy_pspell_config(PspellConfig *spell_config);

This means that people won't have to worry about what is
going on underneath (ie malloc vs new, delete vs free) and
it makes the API more symetric.

Thomas



This archive was generated by hypermail 2b25 : Mon Mar 06 2000 - 06:56:41 CST