SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => Topic started by: Hardcoal on November 03, 2019, 17:01:48

Title: why No crash in debug mode and crash in release mode ?
Post by: Hardcoal on November 03, 2019, 17:01:48
Hi

How come when i run something on release it crashes
And same thing on debug mode does not crash?

Im using blide editor
Title: Re: why No crash in debug mode and crash in release mode ?
Post by: col on November 04, 2019, 01:10:39
This can happen because the debugger will use a reference to an object which can cause a 'delayed collection' if any. This doesn't happen in release builds so the offending object(s) will be collected earlier.
Title: Re: why No crash in debug mode and crash in release mode ?
Post by: Hardcoal on November 04, 2019, 01:44:10
Thanks, i thought it's something like that
Title: Re: why No crash in debug mode and crash in release mode ?
Post by: JBR on November 04, 2019, 18:53:20
Pardon my inexperience but how is this avoided?

Jim
Title: Re: why No crash in debug mode and crash in release mode ?
Post by: col on November 05, 2019, 02:32:02
@JBR

Dare I say it?... better code... as in 'non-complicated' code.

From what I remember Hardcoals project is quite big so some level of complication can always creep in when developing larger code bases. One of the arts of programming is that no matter how large the project becomes always keep everything simple, clean and as easy to follow as possible.
Title: Re: why No crash in debug mode and crash in release mode ?
Post by: Hardcoal on November 05, 2019, 06:56:28
Since I solved the problem I think Im Cool :)
Title: Re: why No crash in debug mode and crash in release mode ?
Post by: col on November 05, 2019, 12:05:32
@Hardcoal
Haha +1  8)