Xojo Conferences
MBSOct2019CologneDE

REALLoadObjectMethod leaking memory? (Real Studio Plugins Mailinglist archive)

Back to the thread list
Next thread: Plugins for Intel -Macs


Re: Events and REALRegisterClassExtension (once again)   -   Will Leshner
  REALLoadObjectMethod leaking memory?   -   Alexander Traud
    Re: REALLoadObjectMethod leaking memory?   -   Thomas Tempelmann
     Re: REALLoadObjectMethod leaking memory?   -   Alexander Traud

REALLoadObjectMethod leaking memory?
Date: 13.01.06 16:45 (Fri, 13 Jan 2006 16:45:51 +0100)
From: Alexander Traud
Just testing my Plugin for memory leaks. Found four bugs, one cosmetic bug
and three memory leaks - all none mine but REALbasic's. Great. However, I am
unure about one of the leaks:

REALLoadObjectMethod
Does it leak for you? Here each parameter and return value seems to be left
over as two pointers (type and name) on the heap.

Tested with REALbasic 5.5.5, 2005r4 and 2006r1. Is there a trick? Tried
unlocking the function pointer. No help. Bug?

> I thought REALRegisterClassExtension was deprecated a long time ago.

Could not find that information in the SDK, Feedback or Mailing list
archives. Now, I use REALRegisterMethod with a function which extends
RectControl, throw the instance into the callbacks own reference parameter
and then call an instance method. Con: Every RectControl which wants to use
it needs to be subclassed and the method signature must met. Pro: It works.

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

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

Re: REALLoadObjectMethod leaking memory?
Date: 13.01.06 19:05 (Fri, 13 Jan 2006 19:05:31 +0100)
From: Thomas Tempelmann
Alexander Traud wrote:

>REALLoadObjectMethod
>Does it leak for you

Have not checked yet - but by which method do you determine the leaking?

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

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

Re: REALLoadObjectMethod leaking memory?
Date: 13.01.06 20:47 (Fri, 13 Jan 2006 20:47:08 +0100)
From: Alexander Traud
> by which method do you determine the leaking?

I call an own dynamic rather than a native REALbasic one. The instance has
to have a special method, for example: DragPromise(parent As FolderItem,
type As String, creator As String, row As Integer) As FolderItem
This leaks with 9 pointers counting together for 312 bytes. For each
parameter two pointers: one containing the name the other the parameter
number. The result is another pointer - I think because the data makes no
sense to me.

Yes, the leak is small, very small and you need a lot of calls to recognise
it actually. However, I wonder, because it seems to be there since day one -
could be a misuse by me.

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

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