  The purpose of this paper is to point out a relation between the canonical
sheaf and the intersection complex of a singular algebraic variety. We focus on
the hypersurface case. Let $M$ be a complex manifold, $X\subset M$ a singular
hypersurface. We study residues of top-dimensional meromorphic forms with poles
along $X$. Applying resolution of singularities sometimes we are able to
construct residue classes either in $L^2$-cohomology of $X$ or in the
intersection cohomology. The conditions allowing to construct these classes
coincide. They can be formulated in terms of the weight filtration. Finally,
provided that these conditions hold, we construct in a canonical way a lift of
the residue class to cohomology of $X$.
