Deleting temporary custom types in a function

Blitz3D Forums/Blitz3D Programming/Deleting temporary custom types in a function

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If I create a custom type in a function, and only need it for that function, I use Delete to get rid of it and free up that memory, yes?

What if I need to return that type? For example, a function that populates a type with data and returns the type for use. I can't use Delete before Return, and surely the Return will leave the function and so I can't execute any successive statements.

Can they be deleted, or am I stuck?