Page 1 of 1

Nasty hack: freeing strings

Posted: Thu Jun 12, 2003 2:06 pm
by tinman
Possibly useful for those who have large amounts of dynamic data.

Code: Select all

Structure String
    StructureUnion
        String.s
        Pointer.l
    EndStructureUnion
EndStructure

Procedure FreeString(*free_me.String)
!   MOV     edx, dword [esp+0]
!   MOV     edx, dword [edx]
    ; For PB<3.70
;!   CALL    PB_FreeString
!   CALL    SYS_FreeString
    *free_me\Pointer = 0
EndProcedure

Re: Nasty hack: freeing strings

Posted: Sat Jun 14, 2003 8:00 pm
by idStefke
Doesn't work with PB V3.70

Posted: Sat Jun 14, 2003 8:23 pm
by Karbon
heh. Again, post the specific error/problem and maybe someone can help you. The "Doesn't work" posts sometimes don't get much attention..

Good luck!

Posted: Sun Jun 15, 2003 2:39 am
by tinman
Karbon wrote:heh. Again, post the specific error/problem and maybe someone can help you. The "Doesn't work" posts sometimes don't get much attention.
Yes, especially when it does work with with PB 3.70. Or does here.

Anyway. this topic is a nasty hack. I would recommend that no-one uses it ever.

Really.