grasp at straws
To depend on something that is useless or unable to help in a time of trouble or danger; try something with little hope of succeeding.
To depend on your memory without studying for a test is to grasp at straws.
The robber clutched at straws to make excuses. He said he wasn't in the country when the robbery happened.