[Gambas-user] What are circular references, and how to avoid?

Jaap Cramer jaap_cramer at ...67...
Tue Jan 22 22:00:49 CET 2008


Thanks for the offer
I sent my project with. I deleted the hebr3.gambas file (23MB) from tar, because it was to big. (BTW is this the compilation-file?) I think you cannot use the program because the needed files are not available. You may not understand some comments, they are in dutch; I hope you are still able to read the code :-)

Jaap


----------------------------------------
> From: gambas at ...1...
> To: gambas-user at lists.sourceforge.net
> Date: Tue, 22 Jan 2008 18:02:45 +0100
> Subject: Re: [Gambas-user] What are circular references, and how to avoid?
>
> On mardi 22 janvier 2008, ron wrote:
>> On Tuesday 22 January 2008 12:42, Jaap Cramer wrote:
>>> Hi
>>>
>>> I discovered some. But when I search for ToolPanelContainer, FExpander,
>>> ToolPanel, Expander, I cant find them. I never use those words, so how
>>> can I have made a circular reference? And FExpander isn't even the name
>>> of a control I made...
>>>
>>> BTW, how bad is a circular reference?
>>>
>>> tnx in advance :-)
>>> Jaap
>>>
>>>> What is it
>>>> how serious is this :-)
>>>> and how do I avoid it?
>>>>
>>>> Jaap
>>
>> The explanation of Benoit is correct but I do also not understand it 100%
>> for following reason.
>>
>> I had same finding in the past, and if you search in the complete source
>> code you can find those "ToolPanelContainer, FExpander, ToolPanel,
>> Expander" in components written in gambas. And that is exactly what I do
>> not understand.
>>
>>> Easy, you avoid it by not creating circular references. :-)
>>>
>>> A circular reference is when an object A has a variable that points at an
>>> object B, and that at the same time the object B has a variable that
>>> points at the object A.
>>
>> For me it was stopping to use some of those components.
>>
>> Ron
>>
>
> If you prevent a form from being freed because of a circular reference, then
> all form contents are not freed too. For example, if you have a Toolbar
> inside this form, then you will see internal classes used for implementing
> this Toolbar in the warning messages. Nothing terrible in that...
>
> If I see the project, I will tell where the circular references come from.
>
> Regards,
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

_________________________________________________________________
Nieuw: Windows Live Messenger 2008! Gratis downloaden
http://get.live.com/messenger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hebr3-0.3.3.tar.gz
Type: application/x-gzip
Size: 46631 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080122/e9fc1001/attachment.bin>


More information about the User mailing list