Danger of null List Items?

BlitzMax Forums/BlitzMax Programming/Danger of null List Items?

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.

When you call the Add method and create the local line:TIniLine, bmx should have a reference count of 1 for that variable.

When it's added to the list the reference count gets added to making it 2. When you leave the Add method there is no longer a reference to the local (as it's a local) so the count gets decremented to 1. In short, the way you're doing it is the best way to go about it.