NITCbase / nitcbase.github.io

The entire documentation on implementing the NITCbase project.
https://nitcbase.github.io/
MIT License
10 stars 6 forks source link

Issue with BlockBuffer methods after block has been released #24

Closed SaintNerevar closed 2 years ago

SaintNerevar commented 2 years ago

Most methods in BlockBuffer don't handle the case of being called after the block has been released. Some methods do return E_OUTOFBOUND in that case but the calling methods do no handle this return value. One solution would be to have getBufferPtr() immediately raise an exception when it's called in an object with invalid blockNum. releaseBlock() itself would also have to throw an exception if the same block is sttempted to be released more than once.

gokulsreekumar commented 2 years ago
gokulsreekumar commented 2 years ago
gokulsreekumar commented 2 years ago