IR led and Interrupt 1 cause reset arduino uno.

Hello!! I am using a switch which is connected to arduino uno's interrupt 1(digital pin 3), and using Ken shirrifs IR library for IR signal Transmission.according to IRremote library i connected IR led to digital pin 3. But problem is that in when i pressed the switch instead of generating the interrupt my code runs from beginning ( restart). Then i removed the IR led from digital pin 3, interrupt is working is working fine but i am not able to send IR code. i tried to connect IR led to digital pin 10 and also make a change in IRremote library (irremote.cpp) still i am not able to send the IR hex code.

  TIMSK2 &= ~_BV(TOIE2); //Timer2 Overflow Interrupt
  pinMode(10, OUTPUT);
 // pinMode(3, OUTPUT);
  digitalWrite(10, LOW); // When not sending PWM, we want it low
  //digitalWrite(3, LOW);

so how can i manage to use interrupt 1 and IR transmission both?

Do you have a transistor driving the LED and does it have a seriese resistor?

No, before your comment i did not connected any resistor, Now i connected a resistor and it is not resetting. :) earlier why it was resetting ??

It was resetting because in effect with the raw LED you had a short (or at least about 1.2V ) on your supply. This was dragging the voltage rail so the processor stopped. When it stopped the output pin reverted to an input and stopped drawing current allowing the voltage rail to recover and the processor to restart. You might get away with a visible LED connected without a resistor, it will still damage the output but not restart the processor because the forward voltage is higher than an IR LED.