|
Vier D Themen4D Expertise Geo-Themen + Projekte GoogleMap-Integration • GeoDDDD • Database Publishing • Database PhotographyVerschiedenes die4Dwerkstatt
Kooperation M+V Gminder • andereQuerverbindungen Online-Tools • 4D und TechTippsApple Store down?
Sie möchten DDDD.mettre.de unterstützen? Super Idee! |
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, はい |