Vier D HomeArchivSeminareNachrichten - Twitter4D Expertise
Antworten auf Ihre Fragen •
Datenbank-Pflege •
4D Coaching •
OpenDDDD •
Termine •
4D Expert
V11/V12-Service • Konzepte •
Alternativen •
Meine Apps
Gebrauchtes Mac + iPhone: zu verkaufenFinden Geo-Themen + Projekte GoogleMap-Integration • GeoDDDD • Database Publishing • Database PhotographyVerschiedenes |
8. Sep 2011 Tidy up when doneThese days in the 4D_Tech mailing list: do you clear local variables after you're done with them? I have to process close to a million records. The process is a method that creates big local variables. Big arrays, big text vars. But it's a sub-call, so after each call the locals will get cleared auto-magically. I'm semi-superstitious and am thinking I should clear them myself at the end of the sub-method. Silly? Paranoid? No harm? Great idea? Good question, isn't it?
I'm trough with that! Why, because it's easy now. All I need to do is call Gen_EmptyContent and send all those Vars and fields which need to be emptied like this:
This clears a bunch of variables, takes care about types and even tries not to invoke 4Ds error-handling like here Download the zipped text of the method Answersja, si, oui, はい |