OpenCV Error: Insufficient memory

OpenCV Error: Insufficient memory (Failed to allocate 76800 bytes) in OutOfMemoryError, file ../core/src/alloc.cpp, line 52

I'm getting this error when i run my open cv code for  an hour.Is there any way to fix this without reducing image resolution.