Missing FreeTool() call with ToolData
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/01/2004 at 10:22, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform:
Language(s) : C++ ;---------
there is a missing FreeTool() call if the tool is active and you quit Cinema4D.Tool Data
virtual void FreeTool(BaseDocument *doc, BaseContainer &data;); -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/01/2004 at 11:52, xxxxxxxx wrote:
Hi Klaus,
I don´t think this is a bug. The FreeTool function is meant to be called when switching tools not when leaving Cinema4D. You can use your destructor to free allocated memory when C4D quits. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/01/2004 at 14:46, xxxxxxxx wrote:
It should be called, otherwise it doesn't make sense to use InitTool().
F.e. if InitTool() creates temp-objects in the scene and FreeTool() deletes this, this objects are still there if you quit (and save the scene).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/01/2004 at 09:44, xxxxxxxx wrote:
Quote: Originally posted by Klaus Karlhuber on 10 January 2004
>
> * * *
>
> It should be called, otherwise it doesn't make sense to use InitTool().
>
> Sorry but why doesn´t it make sense? InitTool is called when the tool is chosen and FreeTool is called when the tool is switched (to another tool). Makes sense to me.
>
>
> Quote: Originally posted by Klaus Karlhuber on 10 January 2004
>
> * * *
>
>
> F.e. if InitTool() creates temp-objects in the scene and FreeTool() deletes this, this objects are still there if you quit (and save the scene).
>
> * * *
That´s why I said you should use your destructor :=) It will definetly be called and you can free any resources you allocated in InitTool() if the user quits Cinema 4D with your tool active. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/01/2004 at 03:46, xxxxxxxx wrote:
Yes of course you can go around this problem with the destructor-method. But it would be more convenience if there is a FreeTool call at the end.
F.e. if you need doc in the destructor, you have to store it at the InitTool-call. Therefore this end-call of FreeTool would solve all this workarounds. It's maybe not the correct forum, because it's not really a bug - but there is no ideas/suggestions-forum.
The Maxon-Coder should decide if it makes sense to change this.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/01/2004 at 06:11, xxxxxxxx wrote:
Yes, I agree that it would probably be more convenient and as a suggestion I think it´s good