Page 1 of 1
hb_xgrab can't allocate memory
Posted: Mon Aug 03, 2020 4:06 am
by AUGE_OHR
hi,
i do load a big SDF into EDITBOX using
it does work but when exit and try another big SDF (> 220000 lines) it crash
Question : is there a Way to "free Memory" which was just before
Re: hb_xgrab can't allocate memory
Posted: Mon Aug 03, 2020 4:04 pm
by Rathinagiri
Have you tried releasing the control and redefine it?
Re: hb_xgrab can't allocate memory
Posted: Mon Aug 03, 2020 6:14 pm
by AUGE_OHR
hi,
i have close Windows and open it again.
happens on 32 Bit OS
Re: hb_xgrab can't allocate memory
Posted: Tue Aug 04, 2020 5:53 pm
by salamandra
AUGE_OHR wrote: ↑Mon Aug 03, 2020 6:14 pm
hi,
i have close Windows and open it again.
happens on 32 Bit OS
Did you try RELEASE MEMORY ??
Best regards,
Salamandra, Brazil.
Re: hb_xgrab can't allocate memory
Posted: Tue Aug 04, 2020 5:58 pm
by AUGE_OHR
hi,
salamandra wrote: ↑Tue Aug 04, 2020 5:53 pm
Did you try RELEASE MEMORY ??
no ... but i will try it, THX
Re: hb_xgrab can't allocate memory
Posted: Tue Aug 04, 2020 6:32 pm
by salamandra
AUGE_OHR wrote: ↑Tue Aug 04, 2020 5:58 pm
hi,
salamandra wrote: ↑Tue Aug 04, 2020 5:53 pm
Did you try RELEASE MEMORY ??
no ... but i will try it, THX
AFAIK this error means that used memory can´t be discarded.
Perhaps you can use a
Timer Control in your form to execute a
RELEASE MEMORY.
best regards,
Salamandra, Brazil
Re: hb_xgrab can't allocate memory
Posted: Tue Aug 04, 2020 8:50 pm
by Carlos Britos
Hi,
What about the bytes settled to editbox control ?
AUGE_OHR wrote: ↑Mon Aug 03, 2020 4:06 am
hi,
i do load a big SDF into EDITBOX using
it does work but when exit and try another big SDF (> 220000 lines) it crash
Question : is there a Way to "free Memory" which was just before
Re: hb_xgrab can't allocate memory
Posted: Tue Aug 04, 2020 9:08 pm
by AUGE_OHR
Carlos Britos wrote: ↑Tue Aug 04, 2020 8:50 pm
What about the bytes settled to editbox control ?
now i direct assign it to EDITBOX VALUE ... hm ...
ok, i will try to write a "RELEASE" function and assign NIL
Re: hb_xgrab can't allocate memory
Posted: Tue Aug 04, 2020 9:26 pm
by AUGE_OHR
hi,
YES, that seems to work now, THX
Code: Select all
PROCEDURE TXT_Edit( cFile, lEdit )
LOCAL cMemo := HB_MEMOREAD( cFile )
DEFINE WINDOW TXTEdit ;
...
ON RELEASE TXTRelease() ;
DEFINE EDITBOX TXTCtrl
...
VALUE cMemo
END EDITBOX
END WINDOW
ACTIVATE WINDOW TXTEdit
cMemo := " "
RETURN
Code: Select all
STATIC PROCEDURE TXTRelease()
TXTEdit.TXTCtrl.Value := " "
RETURN