is there a way to see if an instace of tfile stream is being used? for example if i declare FS of type tfilestream,write buffer to it and finally free the stream using tfilestream.free can i check something like:
if
tfilestream.NotActive
then
//code
if tfilestream.beingused then
//code
if tfilestream.free = true then
//code
active and beingused methods do not exists for real nor can we test tfilestream.free = true just making this up to give idea what i am trying to ask
You can't do it in the way you expect. But you and do it with
FreeAndNil()